Look for the ensure keyboard in backtraces

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the ruby category.

Last Updated: 2024-03-02

I scanned the file name and line number of following backtrace and was still in the dark about what happened.

from /Users/jack/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/guard-2.15.1/lib/guard/commander.rb:58:in `ensure in start'
from /Users/jack/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/guard-2.15.1/lib/guard/commander.rb:58:in `start'

Later I revisited and saw the ensure in start bit at the end of line 1. This told me the ensure clause had fired, helping me get to the bottom of the issue.