Hi -- I want to be able to grab some details from an error, but not just
So I want a variable called result to be either the result of a method,
or a property of the error raised by that method.
If the property I wanted from the error was the message, then I could do
this like this:
result = my_method rescue $!
However, what I want to do is call a method on the error, like so:
result = my_method rescue last_error.my_other_method
Where last_error is the mysterious means I employ to get at the error
raised, and my_other_method is what I want to call on it.
Does anyone know if this is possible?
Yup, that worked beautifully, cheers!
Now the scary question is "why on earth didn't I try that?"
I've whittled it down to two possible answers, and the good news for you
is that you are a genius, because the alternative is that I'm a maroon,
and I'm not having that.