Module: Prosody::ErrorClassification
- Included in:
- EventHandler
- Defined in:
- lib/prosody/handler.rb
Overview
Mixin providing class-level methods to wrap instance methods so that specified exceptions are re-wrapped as PermanentError or TransientError.
Instance Method Summary collapse
-
#permanent(method_name, *exception_classes) ⇒ void
Wraps the given instance method so that specified exception types are caught and re-raised as Prosody::PermanentError.
-
#transient(method_name, *exception_classes) ⇒ void
Wraps the given instance method so that specified exception types are caught and re-raised as Prosody::TransientError.
Instance Method Details
#permanent(method_name, *exception_classes) ⇒ void
This method returns an undefined value.
Wraps the given instance method so that specified exception types are caught and re-raised as Prosody::PermanentError.
75 76 77 |
# File 'lib/prosody/handler.rb', line 75 def permanent(method_name, *exception_classes) wrap_errors(method_name, exception_classes, PermanentError) end |
#transient(method_name, *exception_classes) ⇒ void
This method returns an undefined value.
Wraps the given instance method so that specified exception types are caught and re-raised as Prosody::TransientError.
87 88 89 |
# File 'lib/prosody/handler.rb', line 87 def transient(method_name, *exception_classes) wrap_errors(method_name, exception_classes, TransientError) end |