status fo an exception : Exception « Development « Ruby






status fo an exception


begin
    exit(99)
rescue SystemExit => e
    puts "Exit status is: #{e.status}"
end 

 








Related examples in the same category

1.Exceprtion hierarchy
2.exception.success? Returns true is the exit status if nil or zero.
3.exc.to_s Returns the message associated with this exception