From: Toby DiPasquale Date: 2005-10-19T08:56:43+09:00 Subject: Re: rescue'ing OpenSSL errors 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 :) Your clue is the last part of the error. It appears as if the OpenSSL library has generated a SIGABRT. Try this: require 'encrypt' trap( "ABRT") { puts "abort trapped... dumping out" } encrypt( 'test') encrypt( '') See if that works. -- Toby DiPasquale