Skip to content

Instantly share code, notes, and snippets.

@m-maranan
Created March 19, 2014 21:46
Show Gist options
  • Select an option

  • Save m-maranan/9652089 to your computer and use it in GitHub Desktop.

Select an option

Save m-maranan/9652089 to your computer and use it in GitHub Desktop.
Error And Exception Example
// this is how we catch the Runtime Exception
// file : error.php
App::error(function(RuntimeException $exception)
{
// Runtime Errors
return "Runtime Error : ". $exception->getMessage();
});
// Example of Error Message
// file: RegistrationController.
Route::get('test',function(){
App::abort(403, 'The Email you provided is already registered');
});
// The Code Above Outputs
Runtime Error : The Email you provided is already registered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment