Class: Infuser::ExceptionHandler
- Inherits:
-
Object
- Object
- Infuser::ExceptionHandler
- Defined in:
- lib/infuser/exceptions.rb
Constant Summary collapse
- ERRORS =
{ 1 => Infuser::InvalidConfig, 2 => Infuser::InvalidKey, 3 => Infuser::UnexpectedError, 4 => Infuser::DatabaseError, 5 => Infuser::RecordNotFound, 6 => Infuser::LoadingError, 7 => Infuser::NoTableAccess, 8 => Infuser::NoFieldAccess, 9 => Infuser::NoTableFound, 10 => Infuser::NoFieldFound, 11 => Infuser::NoFieldsError, 12 => Infuser::InvalidParameter, 13 => Infuser::FailedLoginAttempt, 14 => Infuser::NoAccess, 15 => Infuser::FailedLoginAttemptPasswordExpired }
Instance Method Summary collapse
-
#initialize(xmlrpc_exception) ⇒ ExceptionHandler
constructor
A new instance of ExceptionHandler.
Constructor Details
#initialize(xmlrpc_exception) ⇒ ExceptionHandler
Returns a new instance of ExceptionHandler.
50 51 52 53 |
# File 'lib/infuser/exceptions.rb', line 50 def initialize xmlrpc_exception error_class = ERRORS[xmlrpc_exception.faultCode] || Infuser::Error raise error_class, xmlrpc_exception.faultString end |