diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a1d26e..2c59db9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Added - Added back `Http\Discovery\NotFoundException` to preserve BC with 0.8 version +- Added interface `Http\Discovery\Exception` which is implemented by all our exceptions ### Changed diff --git a/src/Exception.php b/src/Exception.php new file mode 100644 index 0000000..973c908 --- /dev/null +++ b/src/Exception.php @@ -0,0 +1,12 @@ + + */ +interface Exception +{ +} diff --git a/src/Exception/DiscoveryFailedException.php b/src/Exception/DiscoveryFailedException.php index 387e0f0..6f2164f 100644 --- a/src/Exception/DiscoveryFailedException.php +++ b/src/Exception/DiscoveryFailedException.php @@ -2,12 +2,14 @@ namespace Http\Discovery\Exception; +use Http\Discovery\Exception; + /** * Thrown when all discovery strategies fails to find a resource. * * @author Tobias Nyholm */ -final class DiscoveryFailedException extends \Exception +final class DiscoveryFailedException extends \Exception implements Exception { /** * @var array diff --git a/src/Exception/NotFoundException.php b/src/Exception/NotFoundException.php index 1025287..befbf48 100644 --- a/src/Exception/NotFoundException.php +++ b/src/Exception/NotFoundException.php @@ -2,6 +2,8 @@ namespace Http\Discovery\Exception; +use Http\Discovery\Exception; + /** * Thrown when a discovery does not find any matches. * @@ -9,6 +11,6 @@ * * @author Márk Sági-Kazár */ -/*final */class NotFoundException extends \RuntimeException +/*final */class NotFoundException extends \RuntimeException implements Exception { } diff --git a/src/Exception/StrategyUnavailableException.php b/src/Exception/StrategyUnavailableException.php index 268d09f..89ecf35 100644 --- a/src/Exception/StrategyUnavailableException.php +++ b/src/Exception/StrategyUnavailableException.php @@ -2,12 +2,14 @@ namespace Http\Discovery\Exception; +use Http\Discovery\Exception; + /** * This exception is thrown when we cannot use a discovery strategy. This is *not* thrown when * the discovery fails to find a class. * * @author Tobias Nyholm */ -class StrategyUnavailableException extends \RuntimeException +class StrategyUnavailableException extends \RuntimeException implements Exception { }