Exception: Rex::Post::HWBridge::RequestError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Rex::Post::HWBridge::RequestError
- Defined in:
- lib/rex/post/hwbridge/client.rb
Overview
Exception thrown when a request fails.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
The error result that occurred, typically a windows error code.
-
#method ⇒ Object
readonly
The method that failed.
-
#result ⇒ Object
readonly
The error result that occurred, typically a windows error message.
Instance Method Summary collapse
-
#initialize(method, einfo, ecode = nil) ⇒ RequestError
constructor
A new instance of RequestError.
- #to_s ⇒ Object
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
#code ⇒ Object (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 |
#method ⇒ Object (readonly)
The method that failed.
251 252 253 |
# File 'lib/rex/post/hwbridge/client.rb', line 251 def method @method end |
#result ⇒ Object (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_s ⇒ Object
246 247 248 |
# File 'lib/rex/post/hwbridge/client.rb', line 246 def to_s "#{@method}: Operation failed: #{@result}" end |