By default, rescue only catches exceptions that are derived from
StandardError (not Exception). It's possible that OpenSSL is raising
an exception derived directly from Exception.
Try using "rescue Exception" instead of just "rescue".
regards,
Ed
···
On Wed, Oct 19, 2005 at 07:11:12AM +0900, Robert wrote:
Seems like I can't rescue that because the error comes from a C
library. Is that right?
thanks about pointing that out. Another thing learned
However, it does not work. It still throws that same error (and also quits irb).
Anyway, for me that's not a problem anymore, because I just added:
raise ArgumentError if password.empty?
to my script. But I'm still curious why a "rescue Exception" doesn't work here -- if anyone knows, that'd be cool
On Wed, Oct 19, 2005 at 07:58:50AM +0900, Robert wrote:
Hello Edward,
thanks about pointing that out. Another thing learned
However, it does not work. It still throws that same error (and also
quits irb).
Anyway, for me that's not a problem anymore, because I just added:
raise ArgumentError if password.empty?
to my script. But I'm still curious why a "rescue Exception" doesn't
work here -- if anyone knows, that'd be cool