PKCSError class: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ The <var>PKCSError</var> exception class describes an exception associated with finding data that does not conform to the Public-Key Cryptography Standards (PKCS). S...")
 
 
(4 intermediate revisions by the same user not shown)
Line 17: Line 17:
<li>[[PKCSError methods syntax]] is a single page that contains the syntax diagrams of all the methods in the class. </li>
<li>[[PKCSError methods syntax]] is a single page that contains the syntax diagrams of all the methods in the class. </li>
</ul>
</ul>
==Code function==
{{Template:PKCSError:Code subtitle}}
===Syntax===
{{Template:PKCSError:Code syntax}}
====Syntax terms====
<table>
<tr><th>%number</th>
<td>This numeric variable is one of the return codes that can be reported by the <var>[[AppendCertificateRequest (Stringlist function)|AppendCertificateRequest]]</var> or <var>[[AppendSignedCertificate (Stringlist function)|AppendSignedCertificate]]</var> methods.</td></tr>
<tr><th>pkcsError</th>
<td>An instance of a <var>PKCSError</var> object.
</td></tr>
</table>
==Description function==
{{Template:PKCSError:Description subtitle}}
===Syntax===
{{Template:PKCSError:Description syntax}}
====Syntax terms====
<table>
<tr><th>%string</th>
<td>A string to contain the description of the exception.
</td></tr>
<tr><th>pkcsError</th>
<td>An instance of a <var>PKCSError</var> object.
</td></tr>
</table>


==New constructor==
==New constructor==

Latest revision as of 16:16, 10 October 2016

The PKCSError exception class describes an exception associated with finding data that does not conform to the Public-Key Cryptography Standards (PKCS). See, for example, PKCS #1 for more information about what the standards affect.

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

throw %(PKCSError):new

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

The PKCSErrormethods

The following are the available PKCSError class methods.

MethodDescription
Code
Description
NewCreate a new PKCSError object

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

Code function

Code method (PKCSError class)

Syntax

%number = pKCSError:Code

Syntax terms

%number This numeric variable is one of the return codes that can be reported by the AppendCertificateRequest or AppendSignedCertificate methods.
pkcsError An instance of a PKCSError object.

Description function

Description method (PKCSError class)

Syntax

%string = pKCSError:Description

Syntax terms

%string A string to contain the description of the exception.
pkcsError An instance of a PKCSError object.

New constructor

Create a new PKCSError object (PKCSError class)

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

Syntax

%pKCSError = [%(PKCSError):]New( Code= number, Description= string)

Syntax terms

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