Ruby - Error Handling
You want to catch all exceptions except system-exiting ones like SystemExit and Interrupt. Which class should you rescue to catch most errors but allow system exits?
You want to catch all exceptions except system-exiting ones like SystemExit and Interrupt. Which class should you rescue to catch most errors but allow system exits?
SystemExit and Interrupt inherit directly from Exception, not StandardError.StandardError catches most runtime errors but excludes system-exiting exceptions.Exception catches everything including system exits, which is usually not desired.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions