Exception: Symgate::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Symgate::Error
- Defined in:
- lib/symgate/error.rb
Overview
Defines a symgate-specific error so this can be caught by the caller
Instance Attribute Summary collapse
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#original_error ⇒ Object
Returns the value of attribute original_error.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message) ⇒ Error
constructor
Initialises a symgate error from either a string or a Savon error.
Constructor Details
#initialize(message) ⇒ Error
Initialises a symgate error from either a string or a Savon error
9 10 11 |
# File 'lib/symgate/error.rb', line 9 def initialize() super() end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
6 7 8 |
# File 'lib/symgate/error.rb', line 6 def detail @detail end |
#original_error ⇒ Object
Returns the value of attribute original_error.
6 7 8 |
# File 'lib/symgate/error.rb', line 6 def original_error @original_error end |
Class Method Details
.from_savon(error) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/symgate/error.rb', line 13 def self.from_savon(error) e = Symgate::Error.new((error)) e.original_error = error e end |
.message_from_savon_error(error) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/symgate/error.rb', line 25 def self.(error) "#{error.}. #{error.to_hash[:fault][:detail]}" rescue StandardError # :nocov: error. # :nocov: end |