Module: Pry::UserError
- Defined in:
- lib/pry/exceptions.rb
Overview
An Exception Tag (cf. Exceptional Ruby) that instructs Pry to show the error in a more user-friendly manner. This should be used when the exception happens within Pry itself as a direct consequence of the user typing something wrong.
This allows us to distinguish between the user typing:
pry(main)> def ) SyntaxError: unexpected )
pry(main)> method_that_evals(“def )”) SyntaxError: (eval):1: syntax error, unexpected ‘)’ from ./a.rb:2 in ‘eval’