Skip to content

Instantly share code, notes, and snippets.

@MissAllSunday
Created May 12, 2013 20:05
Show Gist options
  • Save MissAllSunday/5564725 to your computer and use it in GitHub Desktop.
Save MissAllSunday/5564725 to your computer and use it in GitHub Desktop.
before:
throw new RuntimeException(isset($content['message']) ? $content['message'] : $content, $response->getStatusCode());
now:
try
{
throw new RuntimeException(isset($content['message']) ? $content['message'] : $content, $response->getStatusCode());
}
catch (RuntimeException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment