Name
rescue Statement
Synopsis
code
rescueexpression
Evaluates the
expression
if an exception (a subclass of
StandardError
) is raised during the execution of
the code
. This is exactly equivalent to:
begin code rescue StandardError expression end
Get Ruby in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.