Class: Thrifty::Logger::StderrExceptionHanlder
- Inherits:
-
Object
- Object
- Thrifty::Logger::StderrExceptionHanlder
- Defined in:
- lib/thrifty/logger/exception_handlers/stderr_exception_handler.rb
Instance Method Summary collapse
- #call(ex, scope, context) ⇒ Object
-
#initialize(appender = nil) ⇒ StderrExceptionHanlder
constructor
A new instance of StderrExceptionHanlder.
Constructor Details
#initialize(appender = nil) ⇒ StderrExceptionHanlder
Returns a new instance of StderrExceptionHanlder.
4 5 6 |
# File 'lib/thrifty/logger/exception_handlers/stderr_exception_handler.rb', line 4 def initialize(appender = nil) @appender = appender || IoAppender.new(STDERR) end |
Instance Method Details
#call(ex, scope, context) ⇒ Object
8 9 10 11 |
# File 'lib/thrifty/logger/exception_handlers/stderr_exception_handler.rb', line 8 def call(ex, scope, context) entry = ExceptionEntry.new(nil, nil, scope, ex, context) @appender.call(entry) end |