Skip to content

Instantly share code, notes, and snippets.

@robertdown
Created November 11, 2013 18:57
Show Gist options
  • Save robertdown/7418403 to your computer and use it in GitHub Desktop.
Save robertdown/7418403 to your computer and use it in GitHub Desktop.
<?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