Exception: LabelZoom::ValidationError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- LabelZoom::ValidationError
- Defined in:
- lib/labelzoom/errors.rb
Overview
A request rejected locally, before any network call.
Deliberately an ArgumentError and not an APIError: this is a bug in the calling code, not a server response. It carries no status, it is never retried, and a caller rescuing APIError to implement fallback behaviour should not swallow it.
This is also what makes conformance/skips/ruby.json's stated reason literally true: Ruby has no compile step, so a source-only format passed as a target is caught here.
Instance Attribute Summary collapse
-
#parameter ⇒ String
readonly
The conversion parameter at fault, named as it appears on the wire.
Instance Method Summary collapse
-
#initialize(parameter, message) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(parameter, message) ⇒ ValidationError
Returns a new instance of ValidationError.
87 88 89 90 |
# File 'lib/labelzoom/errors.rb', line 87 def initialize(parameter, ) super() @parameter = parameter end |
Instance Attribute Details
#parameter ⇒ String (readonly)
Returns the conversion parameter at fault, named as it appears on the wire.
85 86 87 |
# File 'lib/labelzoom/errors.rb', line 85 def parameter @parameter end |