Ruby - Error Handling
What will be the output of this Ruby code?
begin raise IOError, 'File error' rescue StandardError => e puts e.class end
What will be the output of this Ruby code?
begin raise IOError, 'File error' rescue StandardError => e puts e.class end
IOError with message 'File error'.StandardError and its subclasses. IOError is a subclass of StandardError, so it is caught.e.class, which is IOError.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions