Skip to content

Instantly share code, notes, and snippets.

@hashmal
Last active December 16, 2015 06:29
Show Gist options
  • Save hashmal/5391756 to your computer and use it in GitHub Desktop.
Save hashmal/5391756 to your computer and use it in GitHub Desktop.
-- try/rescue example
[] -- This list will be used as a data-stack by the `try' operation.
(try) [ derp ] -- `derp' is undefined
(rescue) [ "Error happened. Recovering." puts ]
"Recovered from error." puts
-- When run, it displays the following:
--
-- Error happened. Recovering.
-- Recovered from error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment