U:RDoc::NormalClass[iI"Exception:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"DDescendants of class Exception are used to communicate between ;TI"PKernel#raise and +rescue+ statements in begin ... end blocks. ;TI"NException objects carry information about the exception -- its type (the ;TI"Kexception's class name), an optional descriptive string, and optional ;TI"Etraceback information. Exception subclasses may add additional ;TI"%information like NameError#name.;To:RDoc::Markup::BlankLineo; ;[I"NPrograms may make subclasses of Exception, typically of StandardError or ;TI"MRuntimeError, to provide custom classes and add additional information. ;TI"GSee the subclass list below for defaults for +raise+ and +rescue+.;T@o; ;[ I"IWhen an exception has been raised but not yet handled (in +rescue+, ;TI"O+ensure+, +at_exit+ and +END+ blocks) the global variable $! ;TI"Iwill contain the current exception and $@ contains the ;TI"#current exception's backtrace.;T@o; ;[ I"PIt is recommended that a library should have one subclass of StandardError ;TI"Nor RuntimeError and have specific exception types inherit from it. This ;TI"Pallows the user to rescue a generic exception type to catch all exceptions ;TI"Jthe library may raise even if future versions of the library add new ;TI"exception subclasses.;T@o; ;[I"For example:;T@o:RDoc::Markup::Verbatim;[I"class MyLibrary ;TI"" class Error < RuntimeError ;TI" end ;TI" ;TI"! class WidgetError < Error ;TI" end ;TI" ;TI" class FrobError < Error ;TI" end ;TI" ;TI" end ;T: @format0o; ;[I"JTo handle both WidgetError and FrobError the library user can rescue ;TI"MyLibrary::Error.;T@o; ;[I".The built-in subclasses of Exception are:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0;[o; ;[I"NoMemoryError;To;;0;[o; ;[I"ScriptError;To; ;;;[o;;0;[o; ;[I"LoadError;To;;0;[o; ;[I"NotImplementedError;To;;0;[o; ;[I"SyntaxError;To;;0;[o; ;[I"SecurityError;To;;0;[o; ;[I"SignalException;To; ;;;[o;;0;[o; ;[I"Interrupt;To;;0;[o; ;[I"*StandardError -- default for +rescue+;To; ;;;[o;;0;[o; ;[I"ArgumentError;To; ;;;[o;;0;[o; ;[I"UncaughtThrowError;To;;0;[o; ;[I"EncodingError;To;;0;[o; ;[I"FiberError;To;;0;[o; ;[I" IOError;To; ;;;[o;;0;[o; ;[I" EOFError;To;;0;[o; ;[I"IndexError;To; ;;;[o;;0;[o; ;[I" KeyError;To;;0;[o; ;[I"StopIteration;To;;0;[o; ;[I"LocalJumpError;To;;0;[o; ;[I"NameError;To; ;;;[o;;0;[o; ;[I"NoMethodError;To;;0;[o; ;[I"RangeError;To; ;;;[o;;0;[o; ;[I"FloatDomainError;To;;0;[o; ;[I"RegexpError;To;;0;[o; ;[I"(RuntimeError -- default for +raise+;To;;0;[o; ;[I"SystemCallError;To; ;;;[o;;0;[o; ;[I" Errno::*;To;;0;[o; ;[I"ThreadError;To;;0;[o; ;[I"TypeError;To;;0;[o; ;[I"ZeroDivisionError;To;;0;[o; ;[I"SystemExit;To;;0;[o; ;[I"SystemStackError;To;;0;[o; ;[I""fatal -- impossible to rescue;T: @fileI" error.c;T:0@omit_headings_from_table_of_contents_below0o;;[;I"'ext/json/lib/json/add/exception.rb;T;0;0;0[[[[[I" class;T[[: public[[I"exception;TI" error.c;T[I"json_create;FI"'ext/json/lib/json/add/exception.rb;T[I"new;T@[:protected[[: private[[I" instance;T[[;[[I"==;T@[I" as_json;F@[I"backtrace;T@[I"backtrace_locations;T@[I" cause;T@[I"exception;T@[I" inspect;T@[I" message;T@[I"set_backtrace;T@[I" to_json;F@[I" to_s;T@[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[@ó@ö@öcRDoc::TopLevel