Created
October 17, 2017 17:04
-
-
Save suhanlee/a382b2f1f99758fe2974b5ffe77743a0 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
Pry.config.exception_handler = proc do |output, exception, _| | |
if UserError === exception && SyntaxError === exception | |
output.puts "SyntaxError: #{exception.message.sub(/.*syntax error, */m, '')} | |
else | |
output.puts "#{exception.class}: #{exception.message}" | |
output.puts "from #{exception.backtrace}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment