Skip to content

Commit

Permalink
Merge pull request #30 from mezzio/exceptions-cannot-be-caught
Browse files Browse the repository at this point in the history
Fix: `ExceptionInterface` cannot be caught
  • Loading branch information
Ocramius authored Jan 11, 2023
2 parents 11da679 + 00d3f86 commit 482bbd5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Mezzio\Helper\Exception;

interface ExceptionInterface
use Throwable;

interface ExceptionInterface extends Throwable
{
}
1 change: 1 addition & 0 deletions src/Exception/MalformedRequestBodyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Exception;
use InvalidArgumentException;

/** @final */
class MalformedRequestBodyException extends InvalidArgumentException implements ExceptionInterface
{
/** @param string $message */
Expand Down
1 change: 1 addition & 0 deletions src/Exception/MissingHelperException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use DomainException;
use Psr\Container\ContainerExceptionInterface;

/** @final */
class MissingHelperException extends DomainException implements
ContainerExceptionInterface,
ExceptionInterface
Expand Down
1 change: 1 addition & 0 deletions src/Exception/MissingRouterException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use DomainException;
use Psr\Container\ContainerExceptionInterface;

/** @final */
class MissingRouterException extends DomainException implements
ContainerExceptionInterface,
ExceptionInterface
Expand Down
1 change: 1 addition & 0 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Mezzio\Helper\Exception;

/** @final */
class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}

0 comments on commit 482bbd5

Please sign in to comment.