Dancer’s error catching: context output

When you’re writing a webapp framework, everything is important, because what you want is that your framework is as easy as possible to adopt.

That means, quite everything you implement should play in that direction, you have to make the life easier for the end-user, eg the web developer.

These daysnights, I work on writing a cool and extensible error catcher for Dancer, I want it to grab all errors or warnings and display them as informative as possible. The last item I wanted was to display to code region where the catched error did occur.

Perl did give me already the error message, the file and the line, what remained to do was to read the file and display to revelant part of it.

As a picture is better than a long story, please take a look at that screenshot.

The git commit is on the way ;)

2 responses to “Dancer’s error catching: context output

  1. oz

    That is pretty cool. :)

  2. :-) Next step is to support Devel::SimpleTrace‘s output as well, so we can display a nice stackcall instead of a single error message. This will be shipped with 0.9905 (but is already in GitHub repo).

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes