Exception: LittleGhost::StructuredResultError
- Inherits:
-
ProtocolError
- Object
- StandardError
- Error
- ProviderError
- ProtocolError
- LittleGhost::StructuredResultError
- Defined in:
- lib/little_ghost/errors.rb
Overview
Raised when structured output is absent, invalid, or exceeds safety limits.
Instance Attribute Summary collapse
-
#schema_name ⇒ Object
readonly
Declared schema name and validation messages returned by local checking.
-
#validation_errors ⇒ Object
readonly
Declared schema name and validation messages returned by local checking.
Instance Method Summary collapse
-
#initialize(message, schema_name:, validation_errors: []) ⇒ StructuredResultError
constructor
Records the schema and freezes normalized validation messages.
Constructor Details
#initialize(message, schema_name:, validation_errors: []) ⇒ StructuredResultError
Records the schema and freezes normalized validation messages.
29 30 31 32 33 |
# File 'lib/little_ghost/errors.rb', line 29 def initialize(, schema_name:, validation_errors: []) @schema_name = schema_name.to_s.freeze @validation_errors = Array(validation_errors).map(&:to_s).freeze super() end |
Instance Attribute Details
#schema_name ⇒ Object (readonly)
Declared schema name and validation messages returned by local checking.
26 27 28 |
# File 'lib/little_ghost/errors.rb', line 26 def schema_name @schema_name end |
#validation_errors ⇒ Object (readonly)
Declared schema name and validation messages returned by local checking.
26 27 28 |
# File 'lib/little_ghost/errors.rb', line 26 def validation_errors @validation_errors end |