[rspec-devel] [ rspec-Bugs-11749 ] Use of 'rescue => e' does not catch all exceptions

noreply at rubyforge.org noreply at rubyforge.org
Sat Jun 23 06:39:00 EDT 2007


Bugs item #11749, was opened at 2007-06-21 18:50
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11749&group_id=797

>Category: runner module
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Bob Cotton (bcotton)
>Assigned to: David Chelimsky (dchelimsky)
Summary: Use of 'rescue => e' does not catch all exceptions

Initial Comment:

There are several uses of 'rescue => e' in Behaviour and Example. 

According my PixAxe book rescue without an exception type will only catch RuntimeException. 

This seems wrong. I've got Timeout::Error (an Interrupt) escaping and killing my entire spec run. very frustrating.



----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-23 10:39

Message:
Fixed in r2108

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-22 23:14

Message:
Well MY PickAxe book says it catches StandardError or anything derived from it.

Regardless, we have a problem in that anything not derived from StandardError will go uncaught. Will address soon. Will address sooner if you or somebody else submits failing examples.

Cheers,
David

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11749&group_id=797


More information about the rspec-devel mailing list