class JSON::GeneratorError
This exception is raised if a generator or unparser error occurs.
Attributes
Public Class Methods
Source
# File vendor/bundle/ruby/3.4.0/gems/json-2.10.2/lib/json/common.rb, line 149 def initialize(message, invalid_object = nil) super(message) @invalid_object = invalid_object end
Calls superclass method
Public Instance Methods
Source
# File vendor/bundle/ruby/3.4.0/gems/json-2.10.2/lib/json/common.rb, line 154 def detailed_message(...) # Exception#detailed_message doesn't exist until Ruby 3.2 super_message = defined?(super) ? super : message if @invalid_object.nil? super_message else "#{super_message}\nInvalid object: #{@invalid_object.inspect}" end end
Calls superclass method