Module: Ripl::Rc::StripBacktrace
- Includes:
- U
- Defined in:
- lib/ripl/rc/strip_backtrace.rb
Defined Under Namespace
Modules: Imp
Instance Method Summary collapse
-
#format_error(e) ⇒ Object
strip backtrace until ripl.
- #get_error(e, backtrace = e.backtrace) ⇒ Object
Methods included from U
Methods included from Ripl::Rc::SqueezeHistory::Imp
Methods included from Imp
#cwd, #home, #snip, #strip_backtrace
Methods included from Anchor::Imp
Methods included from Color::Imp
#black, #blue, #color, #colors, #cyan, #find_color, #green, #magenta, #red, #reset, #white, #yellow
Instance Method Details
#format_error(e) ⇒ Object
strip backtrace until ripl
8 9 10 11 12 |
# File 'lib/ripl/rc/strip_backtrace.rb', line 8 def format_error e return super if StripBacktrace.disabled? , backtrace = get_error(e, U.strip_backtrace(e, @name)) "#{}\n #{backtrace.join("\n ")}" end |
#get_error(e, backtrace = e.backtrace) ⇒ Object
14 15 16 17 |
# File 'lib/ripl/rc/strip_backtrace.rb', line 14 def get_error e, backtrace=e.backtrace return super if StripBacktrace.disabled? ["#{e.class}: #{e.}", backtrace] end |