Skip to content

Commit

Permalink
main class can catch Throwable, fix it in the main Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondřej Ešler committed Nov 20, 2018
1 parent 9cfae1d commit 21ef635
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ServiceContainer/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Exception extends \Exception implements ContainerExceptionInterface
{

public function __construct(string $message = null, \Exception $previous = null) {
public function __construct(string $message = null, \Throwable $previous = null) {
parent::__construct($message, 0, $previous);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ServiceContainer/ServiceNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class ServiceNotFoundException extends Exception implements NotFoundExceptionInterface
{
public function __construct(string $id, \Exception $previous = null)
public function __construct(string $id, \Throwable $previous = null)
{
parent::__construct('Service object not found, id: ' . $id, $previous);
}
Expand Down

0 comments on commit 21ef635

Please sign in to comment.