1

I'm using laravel 4, and loving it so far - but i'm trying to create a custom error handler.

The default error handler is:

App::error(function (Exception $exception, $code) {
});

Now I would like be able to get the line number, the file, and the error of which the error is occurring in, the problem is everything in $exception seems to be private - and doing a var_dump of it seems to crash my browser as it's so long.

Any help would be great.

1 Answer 1

3

This is working fine for me:

App::error(function (Exception $exception, $code) {

   echo "<pre>";
   var_dump( $exception->getTrace() );
   echo "</pre>";

});

Try it, please.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.