class JSON::GeneratorError
This exception is raised if a generator or unparser error occurs.
Attributes
Public Class Methods
Source
# File ext/json/lib/json/common.rb, line 149 def initialize(message, invalid_object = nil) super(message) @invalid_object = invalid_object end
Calls superclass method
Exception::new
Public Instance Methods
Source
# File 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
Calls superclass method
Exception#detailed_message