Sha256: 14c4cd51665e878a35fc6464226c55ce7f1d0219180da8b3f07eb65eb00ff29c
Contents?: true
Size: 919 Bytes
Versions: 33
Compression:
Stored size: 919 Bytes
Contents
module DaemonKit module ErrorHandlers # Error handlers in DaemonKit are used by the #Safety class. Any # error handler has to support the interface provided by this # class. It's also required that safety handlers implement a # singleton approach (handled by default by #Base). class Base class << self @instance = nil def instance @instance ||= new end private :new # When we're inherited, immediately register the handler with # the safety net def inherited( child ) #:nodoc: Safety.register_error_handler( child ) end end # Error handlers should overwrite this method and implement # their own reporting method. def handle_exception( exception ) raise NoMethodError, "Error handler doesn't support #handle_exception" end end end end
Version data entries
33 entries across 33 versions & 5 rubygems