[Catalyst] StackTrace Patch

Christopher H. Laco claco at chrislaco.com
Fri May 19 15:48:01 CEST 2006


Now that I'm knee deep in the Handel refactor, I'm seeing a lot of stack
trace screens in Cat that point out the errors of my ways. :-)

After staring at that stack trace for a few days, there were two things
that bugged me:

#1. The "line" in question was bold, but still barely different from the
other lines of code in white. With an expanded context value, that
became even worse.

#2. In verbose mode, the stack frames were in newest to oldest
order...aka from codes perspective. But I'm wanted to order them by the
callers perspective...from the Cat code, down into the core.


Attached is a patch to fix both of those issues. First, there is a new
config option called "reverse". When set, it simply reverses the stack
frame order. When not set, it leaves the frame order as it is now.

I've also replaced the <b></b> around the "line" with <strong></strong>,
because that's the in thing to do, and I've given it a .line class
attribute and added a new div#stacktrace .line  style to the css.

I just picked a very very light greenish white color. Feel free to
change it at will.

Attached are the patch, and a before and after screenshot of the stack
frame order.


-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StackTrace.pm.patch
Type: text/x-patch
Size: 1641 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060519/0ff08370/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: normal.png
Type: image/png
Size: 81710 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060519/0ff08370/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reversed.png
Type: image/png
Size: 79923 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060519/0ff08370/attachment-0003.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060519/0ff08370/attachment-0001.pgp 


More information about the Catalyst mailing list