------art_843_31220540.1326731502714
Content-Type: multipart/alternative; 
	boundary---art_844_32970456.1326731502714"

------art_844_32970456.1326731502714
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

This question might be a bit technical with regards to the inner workings 
of Ruby. (I considered posint to ruby-core) but hopefully here someone will 
know.

Whittling it down to the essentials, I am wondering if it is safe to raise 
the same error instance multiple times.

    $ANERROR  untimeError.new

    def foo(var)
      begin
        raise $ANERROR, "dynamic message here #{var}" if var.says_so?
      rescue
        recorded_errors << var
      end
    end

The function in itself doesn't matter, that's just a silly example. The 
main thing is the re-raising of a single instance of the error class, in 
this example $ANERROR.


------art_844_32970456.1326731502714
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

This question might be a bit technical with regards to the inner workings of Ruby. (I considered posint to ruby-core) but hopefully here someone will know.<br><br>Whittling it down to the essentials, I am wondering if it is safe to raise the same error instance multiple times.<br><br>&nbsp;&nbsp;&nbsp; $ANERROR  untimeError.new<br><br>&nbsp;&nbsp;&nbsp; def foo(var)<br>&nbsp; &nbsp; &nbsp; begin<br> &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; raise $ANERROR, "dynamic message here #{var}" if var.says_so?<br>&nbsp; &nbsp; &nbsp; rescue<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; recorded_errors &lt;&lt; var<br>&nbsp; &nbsp; &nbsp; end<br>&nbsp; &nbsp; end<br><br>The function in itself doesn't matter, that's just a silly example. The main thing is the re-raising of a single instance of the error class, in this example $ANERROR.<br><br>
------art_844_32970456.1326731502714--

------art_843_31220540.1326731502714--