-
-
Save cmb69/076c484387aee43d4c61b132994d8da9 to your computer and use it in GitHub Desktop.
PEAR CS demo
This file contains 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 | |
class SpecificException extends Exception | |
{} | |
function test() | |
{ | |
do_something_risky() or throw new Exception('It did not work'); | |
} | |
try { | |
test(); | |
} catch (Exception $e) { | |
print $e->getMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment