On Feb 17, 7:34 pm, Avdi Grimm wrote:
> On Thu, Feb 17, 2011 at 11:46 AM, Justin Ko wrote:
> > "A straight-up exception will bypass all default "rescue" clauses" - I
> > learn something everyday!
>
> If you will forgive a brief moment of self-promotion, I recently
> posted an entire talk I did on
On Thu, Feb 17, 2011 at 11:46 AM, Justin Ko wrote:
> "A straight-up exception will bypass all default "rescue" clauses" - I
> learn something everyday!
If you will forgive a brief moment of self-promotion, I recently
posted an entire talk I did on Ruby exception handling:
http://avdi.org/devblog/
On Feb 17, 7:36 am, Avdi Grimm wrote:
> On Wed, Feb 16, 2011 at 7:24 AM, Yuriy Naidyon wrote:
> > def some_action
> > raise Exception if some_falsy_value
> > rescue
> > @message = 'Error'
> > end
>
> Don't raise Exception. Raise some descendant of StandardError, like
> RuntimeError (the def
On Wed, Feb 16, 2011 at 7:24 AM, Yuriy Naidyon wrote:
> def some_action
> raise Exception if some_falsy_value
> rescue
> @message = 'Error'
> end
Don't raise Exception. Raise some descendant of StandardError, like
RuntimeError (the default if you don't specify a class) or (even
better) your o
Hi folks. I'm currently using rspec-2.4.0 and rspec-rails-2.4.1.
In the controller I have the code like this (at least at two different
places):
def some_action
raise Exception if some_falsy_value
rescue
@message = 'Error'
end
but when I do testing with rspec this exception doesn't proceeded