Skip to content

Instantly share code, notes, and snippets.

@m-maranan
Created March 19, 2014 21:25
Show Gist options
  • Save m-maranan/9651711 to your computer and use it in GitHub Desktop.
Save m-maranan/9651711 to your computer and use it in GitHub Desktop.
errors.php
<?php
App::error(function(Exception $exception)
{
// Server Side Errors. Displays Error Message
return 'Server Error : '.$exception->getMessage();
});
App::error(function(RuntimeException $exception)
{
// Runtime Errors
return "Runtime Error";
});
App::fatal(function($exception)
{
// Fatal Error Messages like syntax Error Messages
return "Fatal Error : " . $exception->getMessage();
});
App::missing(function($exception)
{
// Not Found Exceptions
return 'Page not Found : '. URL::current();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment