Exception: Acapela::ServiceError

Inherits:
Error
  • Object
show all
Defined in:
lib/acapela/error.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#original_error

Instance Method Summary collapse

Constructor Details

#initialize(message, code = '') ⇒ ServiceError

Returns a new instance of ServiceError.



23
24
25
26
# File 'lib/acapela/error.rb', line 23

def initialize(message, code = '')
  super(message)
  @code = code
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



21
22
23
# File 'lib/acapela/error.rb', line 21

def code
  @code
end

Instance Method Details

#to_sObject



28
29
30
# File 'lib/acapela/error.rb', line 28

def to_s
  "Code: #{code}, Message: #{super}"
end