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
| product name | product description |
|---|
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 colorize(text, color_code) | |
| "\e[#{color_code}m#{text}\e[0m" | |
| end | |
| begin | |
| # Here be dangerous things. | |
| rescue => e | |
| print "\r" << (' ' * 50) << "\n" | |
| stacktrace = e.backtrace.map do |call| | |
| if parts = call.match(/^(?<file>.+):(?<line>\d+):in `(?<code>.*)'$/) |