Adding the ability to show causes in the DebugExceptions view

24 views
Skip to first unread message

yk.nis...@gmail.com

unread,
Mar 8, 2018, 10:20:00 PM3/8/18
to Ruby on Rails: Core
Hi all,

The Exception#cause method has been added to Ruby 2.1.0 back in 2013. Since then Rails has adopted it to replace the #original_exception method in a few classes such as the ActiveSupport::Rescuable, and I believe we could take a step further to help debug an app in development. One low-hanging fruit that I see is to add the ability to show causes in the DebugExceptions view. I have made a proof-of-concept implementation to see if it could be really useful. Here is a screenshot of what it looks like:




Of course, there is going to be more things to take care of, such as implementing more frontend features and updating how a TemplateError (which already uses #cause) could be shown, but I wanted to get feedback (especially on the visual aspect of the PoC) before I invest more time in it.

Let me know what you all think.

Thanks,
Yuki

Rafael Mendonça França

unread,
Mar 8, 2018, 11:48:30 PM3/8/18
to rubyonra...@googlegroups.com
Looks good to me. Please open a pr
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-co...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages