Exception: GraphQL::DurationEncodingError
- Inherits:
-
RuntimeTypeError
- Object
- StandardError
- Error
- RuntimeTypeError
- GraphQL::DurationEncodingError
- Defined in:
- lib/graphql/duration_encoding_error.rb
Overview
This error is raised when Types::ISO8601Duration
is asked to return a value
that cannot be parsed as an ISO8601-formatted duration by ActiveSupport::Duration.
Instance Attribute Summary collapse
-
#duration_value ⇒ Object
readonly
The value which couldn't be encoded.
Instance Method Summary collapse
-
#initialize(value) ⇒ DurationEncodingError
constructor
A new instance of DurationEncodingError.
Constructor Details
#initialize(value) ⇒ DurationEncodingError
Returns a new instance of DurationEncodingError.
11 12 13 14 |
# File 'lib/graphql/duration_encoding_error.rb', line 11 def initialize(value) @duration_value = value super("Duration cannot be parsed: #{value}. \nDuration must be an ISO8601-formatted duration.") end |
Instance Attribute Details
#duration_value ⇒ Object (readonly)
The value which couldn't be encoded
9 10 11 |
# File 'lib/graphql/duration_encoding_error.rb', line 9 def duration_value @duration_value end |