-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use ParallelException instead of Exception as fallback
- Loading branch information
1 parent
db20e96
commit 88043a2
Showing
5 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Spatie\Async\Output; | ||
|
||
class ParallelException extends \Exception | ||
{ | ||
/** @var string */ | ||
protected $originalClass; | ||
|
||
/** @var string */ | ||
protected $originalTrace; | ||
|
||
public function __construct(string $message, string $originalClass, string $originalTrace) | ||
{ | ||
parent::__construct($message); | ||
$this->originalClass = $originalClass; | ||
$this->originalTrace = $originalTrace; | ||
} | ||
|
||
/** @return string */ | ||
public function getOriginalClass(): string | ||
{ | ||
return $this->originalClass; | ||
} | ||
|
||
/** @return string */ | ||
public function getOriginalTrace(): string | ||
{ | ||
return $this->originalTrace; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Spatie\Async\Tests; | ||
|
||
use Exception; | ||
use stdClass; | ||
|
||
class MyExceptionWithAComplexFirstArgument extends Exception | ||
{ | ||
public $payload; | ||
|
||
public function __construct(stdClass $payload, string $message) | ||
{ | ||
parent::__construct($message); | ||
$this->payload = $payload; | ||
} | ||
} |