class BrocadeAPIClient::BrocadeException
Brocade Exception Classes
Attributes
code[R]
http_status[R]
message[R]
ref[R]
Public Class Methods
new(code: nil, message: nil, ref: nil, http_status: nil)
click to toggle source
Calls superclass method
# File lib/BrocadeAPIClient/exceptions.rb, line 15 def initialize(code: nil, message: nil, ref: nil, http_status: nil) @code = code @message = message @ref = ref @http_status = http_status formatted_string = 'Error: ' formatted_string += format(' (HTTP %s)', @http_status) if @http_status formatted_string += format(' API code: %s', @code) if @code formatted_string += format(' - %s', @message) if @message formatted_string += format(' - %s', @ref) if @ref super(formatted_string) end