Class
This exception is raised if a generator or unparser error occurs.
Attributes
Read
No documentation available
Class Methods
ext/json/lib/json/common.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/ext/json/lib/json/common.rb, line 149
def initialize(message, invalid_object = nil)
super(message)
@invalid_object = invalid_object
end
No documentation available
Instance Methods
ext/json/lib/json/common.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/ext/json/lib/json/common.rb, line 154
def detailed_message(...)
if @invalid_object.nil?
super
else
"#{super}\nInvalid object: #{@invalid_object.inspect}"
end
end
No documentation available