Created
June 6, 2014 16:49
-
-
Save teepluss/33cffc2c5fba8673ff8e to your computer and use it in GitHub Desktop.
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
try{ | |
// ... | |
} | |
catch( Exception $e ) | |
{ | |
if ($e instanceof UserNotFoundException) { | |
// it's an instance of UserNotFoundException, return accordingly | |
} | |
elseif ($e instanceof SomethinElseException) { | |
// it's an instance of SomethinElseException, return accordingly | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment