Exception: CIRunner::Client::Error
- Inherits:
-
StandardError
- Object
- StandardError
- CIRunner::Client::Error
- Defined in:
- lib/ci_runner/client/error.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Instance Method Summary collapse
-
#initialize(error_code, error_body, provider, message = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(error_code, error_body, provider, message = nil) ⇒ Error
Returns a new instance of Error.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ci_runner/client/error.rb', line 12 def initialize(error_code, error_body, provider, = nil) @error_code = error_code.to_i if super() else super(<<~EOM.rstrip) Error while making a request to #{provider}. Code: #{error_code} The response was: #{error_body} EOM end end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
6 7 8 |
# File 'lib/ci_runner/client/error.rb', line 6 def error_code @error_code end |