Skip to content

Commit

Permalink
Merge pull request #17 from rtckit/v0.6.1
Browse files Browse the repository at this point in the history
v0.6.1
  • Loading branch information
cdosoftei authored Oct 12, 2021
2 parents f63c4b6 + c22a2ac commit eb8f2aa
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 202 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rtckit/sip",
"description": "Parser/Renderer for SIP protocol written in PHP",
"version": "0.6.0",
"version": "0.6.1",
"type": "library",
"keywords": [
"sip",
Expand Down
23 changes: 23 additions & 0 deletions src/Exception/SIPException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace RTCKit\SIP\Exception;

use RTCKit\SIP\Message;
use DomainException;
use Throwable;

Expand All @@ -14,4 +15,26 @@
*/
class SIPException extends DomainException implements Throwable
{
/** @var ?Message Partial parsed message, before the exception was encountered */
private ?Message $stub = null;

/**
* Assigns a message stub to the current exception
*
* @param Message $stub Partial message
*/
public function setStub(Message $stub): void
{
$this->stub = $stub;
}

/**
* Retrieve's exception's stub, if any
*
* @return ?Message Partial message
*/
public function getStub(): ?Message
{
return $this->stub;
}
}
Loading

0 comments on commit eb8f2aa

Please sign in to comment.