Adding the ability to show causes in the DebugExceptions view

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding the ability to show causes in the DebugExceptions view

yk.nishijima
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:



The code could be found here: https://github.com/rails/rails/compare/master...yuki24:show-cause-on-debug-view

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

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Adding the ability to show causes in the DebugExceptions view

Rafael Mendonça França
Looks good to me. Please open a pr
On Thu, Mar 8, 2018 at 10:20 PM <[hidden email]> wrote:
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

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.