Exception: Exception
- Defined in:
- lib/rmtools/dev/trace_format.rb
Overview
Usage with Rails. Rails raise and rescue a bunch of exceptions during a first load, a reload of code (e.g. in development env) and maybe even some exceptions for each request. Thus, trace_format should be set only in a console environment after a code is loaded. For a web-server environment use RMTools.format_trace for inspect backtrace after an exception was rescued. Also note that Rails’ autoreload of code won’t rewrite SCRIPT_LINES__.
Instance Method Summary collapse
Instance Method Details
#set_backtrace(src) ⇒ Object
113 114 115 116 117 118 119 120 121 122 |
# File 'lib/rmtools/dev/trace_format.rb', line 113 def set_backtrace src if format = self.class.trace_format if src.is_a? Thread::Backtrace return src else src = RMTools.__send__ format, src end end set_bt src end |
#set_bt ⇒ Object
97 |
# File 'lib/rmtools/dev/trace_format.rb', line 97 alias :set_bt :set_backtrace |