Module: R4A
- Defined in:
- lib/core/r4a/test.rb,
lib/core/r4a/debug.rb,
lib/core/r4a/common.rb,
lib/core/r4a/handler.rb
Defined Under Namespace
Modules: Debug, Test Classes: Handler, Redirect, RequestTermination, RuntimeError
Class Method Summary (collapse)
-
+ (Object) backtrace(e, message)
Print a backtrace from the exception.
Class Method Details
+ (Object) backtrace(e, message)
Print a backtrace from the exception.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/core/r4a/common.rb', line 50 def R4A.backtrace(e, ) out = '*'*80 + "\n" out << "ERROR\n\n" out << "Handled by : #{}\n" out << sprintf("%-14s: %s\n", e.class, e.to_s) out << "\nStack trace:\n\n" i = 1 e.backtrace.each do |stack| out << sprintf("%3i. %s\n", i, stack) i += 1 end out << '*'*80 + "\n" return out end |