Merb-style development exception pages for Mac OS X

I like the merb-style exception pages where there're links to open the files listed in the stack trace in TextMate and the source around each line a lot so I stole the idea (and the code!) and made a patch for Rails: http://dev.rubyonrails.org/ticket/10401

Here's how it looks like in Merb: http://yehudakatz.com/wp-content/uploads/stacktrace.gif

What do you guys think? Personally I find it very convenient to be able to click the line numbers and go right to the source in TextMate.

Oh and the styling does need some work, feel free to spruce it up a bit.

Cheers, Chu Yeow

Looks nice. :slight_smile: But how do the TextMate links work, are they just special URLs? Is there any way one can make editors in Linux compatible with that?

An example of a TextMate link: txmt://open?url=file:///opt/local/lib/ruby/gems/1.8/gems/merb-0.4.1/lib/merb/controller.rb&line=83

I'm not real sure whether other Linux editors allow being linked to like that. If anyone knows of any that binds a custom URL scheme like TextMate (see The TextMate URL Scheme) I'll give it another shot so that it can either be customizable or have a different version for Linux.

I couldn't find anything for Eclipse IDE either (since that's what Aptana is based on) but correct me if I'm on.

Cheers, Chu Yeow

That's the only problem I have with the patch, it seem a bit strange to include a solution specifically for one editor on one platform. Maybe it's better left as a plugin?

Manfred

Good point. Maybe something can be set up in the environment files or variables.

Same here - aside from the TextMate links I think it’s a fantastic idea. One thing I’d love to see as we start out the 2.x+ development is better error pages for everything.

::Jack Danger

Textmate footnotes also does this.

I think this functionality should really stay as a plugin, since its so environment specific.

- Rob

This is my first Rails submission.

ActionController::Base.head() is too wordy, it uses 10 lines of code for what could be done in 2, I’m looking for some feedback!

http://dev.rubyonrails.org/ticket/10417

Thanks!

Steven Soroka

Thanks for all the feedback guys, really appreciate hearing your opinions :slight_smile:

To be honest I kinda knew it was a long shot to get such a platform- specific patch into core but wanted to try anyway :wink: I'll be rolling this into a plugin.

Regarding the non-TextMate change though, which basically shows you snippets of code around the each line in the stack trace, what do you guys feel? Useful enough for developers to be in the Rails core?

One thing I like about the current merb dev error pages is that they segment the cookies and session info instead of putting all the params together in a var dumped request params hash.

One thing I'd love to see as we start out the 2.x+ development is better error pages for everything.

Yup I can't agree more, and a "visual refresh" would feel like a fresh coat of paint too (albeit only cosmetic, but hey, looks do matter on web pages).

Cheers, Chu Yeow

I'm for including this patch by default, and against turning it into a plugin. The feature that this patch provides doesn't seem to get in the way of non-Mac/non-Textmate users, but provides a valuable addition for users who do use them. And while the feature is nice, it's nothing ground-breaking. Turning it into a plugin would mean one more step is needed before people can use the feature, and because of that extra step many people wouldn't even bother.