InvalidCryptoData class: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (ad link to exception example)
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
<p class="code">throw %(InvalidCryptoData):new
<p class="code">throw %(InvalidCryptoData):new
</p>  
</p>  
For an outline of how you might use an exception in a function of your own, see this [[Get (HttpRequest function)#exception-eg|Get method example]].


==The InvalidCryptoData methods==
==The InvalidCryptoData methods==
Line 19: Line 21:
{{Template:InvalidCryptoData:New subtitle}}
{{Template:InvalidCryptoData:New subtitle}}


This <var>Constructor</var> generates an instance of an <var>[[InvalidBase64Data_class|InvalidBase64Data]]</var> exception.  As shown below, the required argument of the <var>New</var> method is a setting of the <var>[[Position_(InvalidBase64Data_property)|Position]]</var> property.
This <var>Constructor</var> generates an instance of an <var>[[InvalidCryptoData_class|InvalidCryptoData]]</var> exception.  As shown below, the <var>New</var> method takes no arguments.


===Syntax===
===Syntax===

Latest revision as of 18:35, 15 March 2016

The InvalidCryptoData exception class describes an exception associated with finding improper object data, for example, an incorrect length.

To produce an InvalidCryptoData exception yourself, you typically use a SOUL Throw statement with an InvalidCryptoData 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 InvalidCryptoData exception:

throw %(InvalidCryptoData):new

For an outline of how you might use an exception in a function of your own, see this Get method example.

The InvalidCryptoData methods

The following are the available InvalidCryptoData class methods.

MethodDescription
NewCreate a new InvalidCryptoData object

The methods in the class are described in the subsections that follow. In addition:

New constructor

Create a new InvalidCryptoData object (InvalidCryptoData class)

This Constructor generates an instance of an InvalidCryptoData exception. As shown below, the New method takes no arguments.

Syntax

%invalidCryptoData = [%(InvalidCryptoData):]New

Syntax terms

%invalidCryptoData A reference to an instance of an InvalidCryptoData object.
[%(InvalidCryptoData):]The class name in parentheses denotes a Constructor.