Exception: Vuzit::ClientException
- Inherits:
-
StandardError
- Object
- StandardError
- Vuzit::ClientException
- Defined in:
- lib/vuzitruby/client_exception.rb
Overview
Vuzit library exception handler class.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
The web service error code.
-
#message ⇒ Object
readonly
The web service error message.
Instance Method Summary collapse
-
#initialize(message, code = 0) ⇒ ClientException
constructor
Constructor for errors.
-
#to_s ⇒ Object
Returns the string representation of the error in this format:.
Constructor Details
#initialize(message, code = 0) ⇒ ClientException
Constructor for errors.
12 13 14 15 |
# File 'lib/vuzitruby/client_exception.rb', line 12 def initialize(, code = 0) @message = @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
The web service error code
9 10 11 |
# File 'lib/vuzitruby/client_exception.rb', line 9 def code @code end |
#message ⇒ Object (readonly)
The web service error message
6 7 8 |
# File 'lib/vuzitruby/client_exception.rb', line 6 def @message end |
Instance Method Details
#to_s ⇒ Object
Returns the string representation of the error in this format:
18 19 20 |
# File 'lib/vuzitruby/client_exception.rb', line 18 def to_s return "Vuzit::ClientException: [#{@code}]: #{@message}"; end |