Exception: VasException
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- VasException
- Defined in:
- lib/vas/vas_exception.rb
Overview
Raised to indicate a failure has occurred when communicating with the vFabric Administration Server
Instance Attribute Summary collapse
-
#code ⇒ Integer?
readonly
The HTTP error code, if any, returned by the server.
-
#messages ⇒ String[]
readonly
The error messages, if any, returned by the server.
Instance Method Summary collapse
-
#initialize(messages, code = nil) ⇒ VasException
constructor
A new instance of VasException.
Constructor Details
#initialize(messages, code = nil) ⇒ VasException
Returns a new instance of VasException.
27 28 29 30 |
# File 'lib/vas/vas_exception.rb', line 27 def initialize(, code=nil) @code = code.to_i unless code.nil? @messages = end |
Instance Attribute Details
#code ⇒ Integer? (readonly)
Returns the HTTP error code, if any, returned by the server.
21 22 23 |
# File 'lib/vas/vas_exception.rb', line 21 def code @code end |
#messages ⇒ String[] (readonly)
Returns the error messages, if any, returned by the server.
24 25 26 |
# File 'lib/vas/vas_exception.rb', line 24 def @messages end |