1 | <?php |
||
10 | final class CommandFailed extends Event implements CommandEvent |
||
11 | { |
||
12 | use HasCommand; |
||
13 | |||
14 | /** |
||
15 | * @var \Exception |
||
16 | */ |
||
17 | protected $exception; |
||
18 | |||
19 | /** |
||
20 | * Checks whether exception is caught |
||
21 | * |
||
22 | * @var bool |
||
23 | */ |
||
24 | protected $exceptionCaught = false; |
||
25 | |||
26 | /** |
||
27 | * @param object $command |
||
28 | * @param \Exception $exception |
||
29 | */ |
||
30 | 9 | public function __construct($command, \Exception $exception) |
|
37 | |||
38 | /** |
||
39 | * Returns the exception |
||
40 | * |
||
41 | * @return \Exception |
||
42 | */ |
||
43 | 1 | public function getException() |
|
47 | |||
48 | /** |
||
49 | * Indicates that exception is caught |
||
50 | */ |
||
51 | 2 | public function catchException() |
|
55 | |||
56 | /** |
||
57 | * Checks whether exception is caught |
||
58 | * |
||
59 | * @return bool |
||
60 | */ |
||
61 | 3 | public function isExceptionCaught() |
|
65 | } |
||
66 |