Hello.
Imagine how paranoid and ugly code would look if one put a
‘begin,rescue, end’ in every action in the app…
With server, mysql, etc errors, is there a way to rescue anything weird
when (not if ) it were to ever happen?
Thoughts?
Dominic
Hello.
Imagine how paranoid and ugly code would look if one put a
‘begin,rescue, end’ in every action in the app…
With server, mysql, etc errors, is there a way to rescue anything weird
when (not if ) it were to ever happen?
Thoughts?
Dominic
Look at the api.rubyonrails.com
http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000067
http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000069
http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000071
You add a function say, rescue_action, in application.rb and it will
handle all your errors.
Thank you very Much Roland. Hope you have a great week.
Roland M. wrote:
Look at the api.rubyonrails.com
http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000067
http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000069
http://api.rubyonrails.com/classes/ActionController/Rescue.html#M000071You add a function say, rescue_action, in application.rb and it will
handle all your errors.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs