Exception: JSON::Schema::ReadError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/json-schema/schema/reader.rb

Overview

Base for any reading exceptions encountered by Reader

Direct Known Subclasses

ReadFailed, ReadRefused

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location, type) ⇒ ReadError

Returns a new instance of ReadError.



14
15
16
17
18
# File 'lib/json-schema/schema/reader.rb', line 14

def initialize(location, type)
  @location = location
  @type = type
  super(error_message)
end

Instance Attribute Details

#locationString (readonly)

Returns the requested schema location which was refused.

Returns:

  • (String)

    the requested schema location which was refused



9
10
11
# File 'lib/json-schema/schema/reader.rb', line 9

def location
  @location
end

#typeSymbol (readonly)

Returns either :uri or :file.

Returns:

  • (Symbol)

    either :uri or :file



12
13
14
# File 'lib/json-schema/schema/reader.rb', line 12

def type
  @type
end