Things You Didn't Know About Exceptions
summary
Shows concrete Ruby tricks: using retry to loop a failing operation; reading the global $! (aka error_info) inside an at_exit crash logger; adding an original pointer for nested exceptions by defaulting to error_info; mutating an exception message to add file/line context while preserving backtrace; overriding raise to attach a continuation so an ignore operation resumes execution (works but is hazardous); Hammer Time gem gives an in-place error console.
AI-written summary · about
chapters (24)
- 0:00Start
- 1:02Using a loop
- 1:24Using retry
- 2:08The $! global
- 3:07A simple crash logger
- 4:45Using nested exceptions
- 5:51Failures without context
- 6:24Adding context
- 7:28raise is a method
- 7:49Overriding raise
- 8:10Hammertime
- 8:52How you think raise works
- 9:52Implement your own #exception
- 10:53rescue and case
- 12:19Really dynamic rescue clauses
- 12:40Dynamic matcher generator
- 14:30abort
- 14:43exit!
- 15:15Ignorable exceptions
- 15:37Ignoring the whiny method
- 16:09Exception with continuation
- 16:35Capturing the continuation
- 17:32Override system raise
- 18:51Thank You








