Re: [Rails-core] Feature Request: Do not allow to give Exception to rescue_from in controllers or at least show warning

2014-06-23 Thread godfoca
Make it a warning, and let people turn the warning off if they actually need it for some reason (though really, I can't think of a valid use case). Cheers, -foca On Mon, Jun 23, 2014 at 7:54 PM, Amiel Martin wrote: >> >> Rescuing `Exception` is not the best practice, but there are reasons

Re: [Rails-core] Feature Request: Do not allow to give Exception to rescue_from in controllers or at least show warning

2014-06-23 Thread Amiel Martin
> > Rescuing `Exception` is not the best practice, but there are reasons that > somebody might want to do it. We can’t save people from doing > silly-but-potentially-valid things. > I agree, but think a warning would be appropriate. -Amiel On Mon, Jun 23, 2014 at 4:03 PM, Matt Jones wrote: >

Re: [Rails-core] Feature Request: Do not allow to give Exception to rescue_from in controllers or at least show warning

2014-06-23 Thread Matt Jones
On Jun 23, 2014, at 9:48 AM, Yuki Nishijima wrote: > When building dynamic error pages, people (specially beginners) always write > rescue_from(Exception, ...) in ApplicationController. You can see it (or > something similar) is suggested on Stackoverflow and even RailsCasts. The RailsCasts e

[Rails-core] Feature Request: Do not allow to give Exception to rescue_from in controllers or at least show warning

2014-06-23 Thread Yuki Nishijima
When building dynamic error pages, people (specially beginners) always write rescue_from(Exception, ...) in ApplicationController. You can see it (or something similar) is suggested on Stackoverflow and even RailsCasts