JsonCircularReference class: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
JsonCircularReference exceptions are thrown by the Stringify function in the Json class if the Json object leads to a circular reference. | JsonCircularReference exceptions are thrown by the Stringify function in the Json class if the Json object leads to a circular reference. | ||
To produce a <var>JsonCircularReference</var> exception for yourself, you typically use a <var class="product">SOUL</var> <var>[[Exceptions#Throwing exceptions|Throw]]</var> statement with a <var>JsonCircularReference</var> <var>[[New_(JsonCircularReference_constructor)|New]]</var> constructor. For example, the following statement throws a <var>JsonCircularReference</var> exception: | To produce a <var>JsonCircularReference</var> exception for yourself, you typically use a <var class="product">SOUL</var> <var>[[Exceptions#Throwing exceptions|Throw]]</var> statement with a <var>JsonCircularReference</var> <var>[[New_(JsonCircularReference_constructor)|New]]</var> constructor. This statement must be issued from within a method, and it can only be caught by the code that calls the method. For example, the following statement throws a <var>JsonCircularReference</var> exception: | ||
<p class="code">throw %(JsonCircularReference):new | <p class="code">throw %(JsonCircularReference):new | ||
</p> | </p> |
Revision as of 15:43, 1 May 2015
JsonCircularReference exceptions are thrown by the Stringify function in the Json class if the Json object leads to a circular reference.
To produce a JsonCircularReference exception for yourself, you typically use a SOUL Throw statement with a JsonCircularReference New constructor. This statement must be issued from within a method, and it can only be caught by the code that calls the method. For example, the following statement throws a JsonCircularReference exception:
throw %(JsonCircularReference):new
The JsonCircularReference methods
The following are the available JsonCircularReference class methods.
Method | Description |
---|---|
New | Create a new JsonCircularReference object |
The methods in the class are described in the subsections that follow. In addition:
- Notation conventions for methods has information about the conventions followed.
- JsonCircularReference methods syntax is a single page that contains the syntax diagrams of all the methods in the class.
New constructor
Create a new JsonCircularReference object (JsonCircularReference class)
This Constructor generates an instance of a JsonCircularReference exception. The New method format is as follows:
Syntax
%jsonCircularReference = [%(JsonCircularReference):]New
Syntax terms
%JsonCircularReference | A reference to an instance of a JsonCircularReference object. |
---|---|
[%(JsonCircularReference):] | The class name in parentheses denotes a Constructor. See Usage notes, below, for more information about invoking a JsonCircularReference Constructor. |
Usage notes
- As described in Using New or other Constructors, New can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is Null:
%jcircref = new %jcircref = %(JsonCircularReference):new %jcircref = %jcircref:new