Skip to content

Commit eb8f2aa

Browse files
authored
Merge pull request #17 from rtckit/v0.6.1
v0.6.1
2 parents f63c4b6 + c22a2ac commit eb8f2aa

File tree

4 files changed

+256
-202
lines changed

4 files changed

+256
-202
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "rtckit/sip",
33
"description": "Parser/Renderer for SIP protocol written in PHP",
4-
"version": "0.6.0",
4+
"version": "0.6.1",
55
"type": "library",
66
"keywords": [
77
"sip",

src/Exception/SIPException.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace RTCKit\SIP\Exception;
88

9+
use RTCKit\SIP\Message;
910
use DomainException;
1011
use Throwable;
1112

@@ -14,4 +15,26 @@
1415
*/
1516
class SIPException extends DomainException implements Throwable
1617
{
18+
/** @var ?Message Partial parsed message, before the exception was encountered */
19+
private ?Message $stub = null;
20+
21+
/**
22+
* Assigns a message stub to the current exception
23+
*
24+
* @param Message $stub Partial message
25+
*/
26+
public function setStub(Message $stub): void
27+
{
28+
$this->stub = $stub;
29+
}
30+
31+
/**
32+
* Retrieve's exception's stub, if any
33+
*
34+
* @return ?Message Partial message
35+
*/
36+
public function getStub(): ?Message
37+
{
38+
return $this->stub;
39+
}
1740
}

0 commit comments

Comments
 (0)