Exception: Rex::Post::HWBridge::RequestError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/rex/post/hwbridge/client.rb

Overview

Exception thrown when a request fails.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, einfo, ecode = nil) ⇒ RequestError

Returns a new instance of RequestError.



240
241
242
243
244
# File 'lib/rex/post/hwbridge/client.rb', line 240

def initialize(method, einfo, ecode=nil)
  @method = method
  @result = einfo
  @code   = ecode || einfo
end

Instance Attribute Details

#codeObject (readonly)

The error result that occurred, typically a windows error code.



257
258
259
# File 'lib/rex/post/hwbridge/client.rb', line 257

def code
  @code
end

#methodObject (readonly)

The method that failed.



251
252
253
# File 'lib/rex/post/hwbridge/client.rb', line 251

def method
  @method
end

#resultObject (readonly)

The error result that occurred, typically a windows error message.



254
255
256
# File 'lib/rex/post/hwbridge/client.rb', line 254

def result
  @result
end

Instance Method Details

#to_sObject



246
247
248
# File 'lib/rex/post/hwbridge/client.rb', line 246

def to_s
  "#{@method}: Operation failed: #{@result}"
end