Skip to content

Instantly share code, notes, and snippets.

@tarto-dev
Created October 21, 2019 12:46
Show Gist options
  • Save tarto-dev/acb3d5f7f781bad796471bd0989e9ee1 to your computer and use it in GitHub Desktop.
Save tarto-dev/acb3d5f7f781bad796471bd0989e9ee1 to your computer and use it in GitHub Desktop.
Perfect error handler -- PHP Version :)
<?php
try {
// Do ur shit here
} catch (Exception $e) {
header("Location : https://stackoverflow.com/search?q=[php]" . $e->getMessage());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment