Created
April 18, 2014 13:45
-
-
Save wouterj/11044979 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <?php | |
| // src/Acme/DemoBundle/Exception/AcmeDemoException.php | |
| namespace Acme\DemoBundle\Exception; | |
| /** | |
| * Special interface for AcmeDemoBundle exceptions | |
| */ | |
| interface AcmeDemoException | |
| { | |
| } |
This file contains hidden or 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
| <?php | |
| // src/Acme/DemoBundle/Exception/InvalidArgumentException.php | |
| namespace Acme\DemoBundle\Exception; | |
| /** | |
| * The InvalidArgumentException for the AcmeDemoBundle, it implements the AcmeDemoException interface. | |
| */ | |
| class InvalidArgumentException extends \InvalidArgumentException implements AcmeDemoException | |
| { | |
| } |
This file contains hidden or 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
| <?php | |
| // src/Acme/OtherBundle/Exception/AcmeOtherException.php | |
| namespace Acme\OtherBundle\Exception; | |
| /** | |
| * Special interface for AcmeOtherBundle exceptions | |
| */ | |
| interface AcmeOtherException | |
| { | |
| } |
This file contains hidden or 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
| <?php | |
| // src/Acme/OtherBundle/Exception/InvalidArgumentException.php | |
| namespace Acme\OtherBundle\Exception; | |
| /** | |
| * The InvalidArgumentException for the AcmeOtherBundle, it implements the AcmeOtherException interface. | |
| */ | |
| class InvalidArgumentException extends \InvalidArgumentException implements AcmeOtherException | |
| { | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now you can throw the correct exception class and catch all of them for one bundle using: