Exception: BlockScore::ValidationError
- Inherits:
-
BlockscoreError
- Object
- StandardError
- BlockscoreError
- BlockScore::ValidationError
- Defined in:
- lib/blockscore/error/validation_error.rb
Constant Summary collapse
- @@http_status =
400
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
Attributes inherited from BlockscoreError
#error_type, #json_body, #message
Instance Method Summary collapse
-
#initialize(message = nil, json_body = nil, error_type = nil, param = nil, error_code = nil) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, json_body = nil, error_type = nil, param = nil, error_code = nil) ⇒ ValidationError
Returns a new instance of ValidationError.
12 13 14 15 16 17 18 19 20 |
# File 'lib/blockscore/error/validation_error.rb', line 12 def initialize(=nil, json_body=nil, error_type=nil, param=nil, error_code=nil) super(, json_body, @@http_status, error_type) @error_code = error_code @param = param end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
7 8 9 |
# File 'lib/blockscore/error/validation_error.rb', line 7 def error_code @error_code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
6 7 8 |
# File 'lib/blockscore/error/validation_error.rb', line 6 def http_status @http_status end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
8 9 10 |
# File 'lib/blockscore/error/validation_error.rb', line 8 def param @param end |
Instance Method Details
#to_s ⇒ Object
22 23 24 25 |
# File 'lib/blockscore/error/validation_error.rb', line 22 def to_s s = "Status: #{@@http_status}, Type: #{@error_type}, Param: #{@param}, " s += "Code: #{@error_code}, Message: #{@message}" end |