Created
June 25, 2014 02:15
-
-
Save bk2204/8f93b8442e477af1f454 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def main | |
| something_that_might_explode_violently | |
| rescue YourError => error | |
| case | |
| when error.status == 404 | |
| search | |
| when error.on_fire | |
| FireDepartment.call(type: :emergency) | |
| when error.status_code == 500 | |
| shame caller(1) | |
| end | |
| raise | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment