Exception: VasException

Inherits:
RuntimeError
  • Object
show all
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

Instance Method Summary collapse

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(messages, code=nil)
  @code = code.to_i unless code.nil?
  @messages = messages
end

Instance Attribute Details

#codeInteger? (readonly)

Returns the HTTP error code, if any, returned by the server.

Returns:

  • (Integer, nil)

    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

#messagesString[] (readonly)

Returns the error messages, if any, returned by the server.

Returns:

  • (String[])

    the error messages, if any, returned by the server



24
25
26
# File 'lib/vas/vas_exception.rb', line 24

def messages
  @messages
end