InvalidGZipData class: Difference between revisions
mNo edit summary |
m (add link to exception example) |
||
Line 3: | Line 3: | ||
An <var>InvalidGZipData</var> exception indicates that during an attempt to extract information from a string, that string was found to not contain the valid result of a GZIP operation. | An <var>InvalidGZipData</var> exception indicates that during an attempt to extract information from a string, that string was found to not contain the valid result of a GZIP operation. | ||
To produce an <var>InvalidGZipData</var> exception yourself, you typically use a <var class="product">User Language</var> <var>[[Exceptions#Using the Throw statement|Throw]]</var> statement with an <var>InvalidGZipData</var> <var>[[ | To produce an <var>InvalidGZipData</var> exception yourself, you typically use a <var class="product">User Language</var> <var>[[Exceptions#Using the Throw statement|Throw]]</var> statement with an <var>InvalidGZipData</var> <var>[[New (InvalidGZipData 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 an <var>InvalidGZipData</var> exception: | ||
<p class="code">throw %(invalidGZipData):new | <p class="code">throw %(invalidGZipData):new | ||
</p> | </p> | ||
Line 9: | Line 9: | ||
Remember that you catch an exception with the <var>[[Exceptions#Try and Catch|Catch]]</var> statement; if an exception condition occurs outside a | Remember that you catch an exception with the <var>[[Exceptions#Try and Catch|Catch]]</var> statement; if an exception condition occurs outside a | ||
<var>Catch</var> for it, the request is cancelled. | <var>Catch</var> for it, the request is cancelled. | ||
For an example of how you might use an exception in your own code, see this [[InvalidValue class|InvalidValue exception example]]. | |||
The <var>InvalidGZipData</var> class is available as of <var class="product">[[Sirius Mods]]</var> version 7.9. | The <var>InvalidGZipData</var> class is available as of <var class="product">[[Sirius Mods]]</var> version 7.9. | ||
Line 21: | Line 23: | ||
<li>[[InvalidGZipData methods syntax|"InvalidGZipData methods syntax"]] is a single page that contains the syntax diagrams of all the methods in the class. | <li>[[InvalidGZipData methods syntax|"InvalidGZipData methods syntax"]] is a single page that contains the syntax diagrams of all the methods in the class. | ||
</ul> | </ul> | ||
==New constructor== | ==New constructor== | ||
Line 27: | Line 28: | ||
This <var>Constructor</var> generates an instance of an <var>[[InvalidGZipData_class|InvalidGZipData]]</var> exception. The <var>New</var> method format follows: | This <var>Constructor</var> generates an instance of an <var>[[InvalidGZipData_class|InvalidGZipData]]</var> exception. The <var>New</var> method format follows: | ||
===Syntax=== | ===Syntax=== | ||
{{Template:InvalidGZipData:New syntax}} | {{Template:InvalidGZipData:New syntax}} | ||
Line 47: | Line 49: | ||
</p> | </p> | ||
</ul> | </ul> | ||
[[Category:System exception classes]] | [[Category:System exception classes]] |
Latest revision as of 19:18, 15 March 2016
An InvalidGZipData exception indicates that during an attempt to extract information from a string, that string was found to not contain the valid result of a GZIP operation.
To produce an InvalidGZipData exception yourself, you typically use a User Language Throw statement with an InvalidGZipData 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 an InvalidGZipData exception:
throw %(invalidGZipData):new
Remember that you catch an exception with the Catch statement; if an exception condition occurs outside a Catch for it, the request is cancelled.
For an example of how you might use an exception in your own code, see this InvalidValue exception example.
The InvalidGZipData class is available as of Sirius Mods version 7.9.
The InvalidGZipData methods
The following are the available InvalidGZipData class methods.
Method | Description |
---|---|
New | Create a new InvalidGZipData 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.
- "InvalidGZipData methods syntax" is a single page that contains the syntax diagrams of all the methods in the class.
New constructor
Create a new InvalidGZipData object (InvalidGZipData class)
[Introduced in Sirius Mods 7.9]
This Constructor generates an instance of an InvalidGZipData exception. The New method format follows:
Syntax
%invalidGZipData = [%(InvalidGZipData):]New
Syntax terms
%invalidGZipData | A reference to an instance of an InvalidGZipData object. |
---|---|
[%(InvalidGZipData):] | The class name in parentheses denotes a Constructor. See "Usage notes", below, for more information about invoking an InvalidGZipData 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:
%invalid = new %invalid = %(InvalidGZipData):new %invalid = %invalid:new