Exception: JSON::JSONError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/json/common.rb

Overview

The base exception for JSON errors.

Class Method Summary collapse

Class Method Details

.wrap(exception) ⇒ Object



138
139
140
141
142
# File 'lib/json/common.rb', line 138

def self.wrap(exception)
  obj = new("Wrapped(#{exception.class}): #{exception.message.inspect}")
  obj.set_backtrace exception.backtrace
  obj
end