Exception: Udb::TopLevelDatabaseObject::SchemaError
- Inherits:
-
StandardError
- Object
- StandardError
- Udb::TopLevelDatabaseObject::SchemaError
- Defined in:
- lib/udb/obj/database_obj.rb
Overview
Exception raised when there is a problem with a schema file
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
result from JsonSchemer.validate.
Instance Method Summary collapse
-
#initialize(result) ⇒ SchemaError
constructor
A new instance of SchemaError.
Constructor Details
#initialize(result) ⇒ SchemaError
Returns a new instance of SchemaError.
309 310 311 312 313 314 315 316 |
# File 'lib/udb/obj/database_obj.rb', line 309 def initialize(result) if result.is_a?(Enumerator) super(result.to_a.map { |e| "At #{e['schema_pointer']}: #{e['type']}" }) else super(result["error"]) end @result = result end |
Instance Attribute Details
#result ⇒ Object (readonly)
result from JsonSchemer.validate
307 308 309 |
# File 'lib/udb/obj/database_obj.rb', line 307 def result @result end |