Exception: FlexColumns::Errors::UnparseableJsonInDatabaseError

Inherits:
InvalidDataInDatabaseError show all
Defined in:
lib/flex_columns/errors.rb

Overview

Raised when the data in the database is not parseable as JSON (via JSON.parse). Note that we take special care to exclude characters from the message that aren’t in a valid encoding, as this is one of the major causes of JSON parsing failures in some situations…and we really don’t want to create an exception that itself has a message with encoding problems.

Instance Attribute Summary collapse

Attributes inherited from InvalidDataInDatabaseError

#additional_message, #data_source, #raw_string

Instance Method Summary collapse

Constructor Details

#initialize(data_source, raw_string, source_exception) ⇒ UnparseableJsonInDatabaseError

Returns a new instance of UnparseableJsonInDatabaseError.



157
158
159
160
# File 'lib/flex_columns/errors.rb', line 157

def initialize(data_source, raw_string, source_exception)
  @source_exception = source_exception
  super(data_source, raw_string)
end

Instance Attribute Details

#source_exceptionObject (readonly)

Returns the value of attribute source_exception.



155
156
157
# File 'lib/flex_columns/errors.rb', line 155

def source_exception
  @source_exception
end