Created
November 11, 2013 18:57
-
-
Save robertdown/7418403 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
<?php | |
function first($param) | |
{ | |
try { | |
// Some logic with $param here | |
throw new CustomException(); | |
} catch (CustomException $e) { | |
// This particular exception | |
// is really bad and needs to | |
// stop everything | |
$logger->log($e->getMessage()); | |
} | |
} | |
function two() | |
{ | |
// ... Logic | |
$return = first($someParam); | |
// This logic can't happen without a valid return from $return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment