InvalidPemData class: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Created page with "An <var>InvalidPemData</var> exception can be thrown by the <var>PemToString</var> method. It has properties (<var>Line</var> and <var>Position...")
 
mNo edit summary
Line 1: Line 1:
An <var>InvalidPemData</var> exception can be thrown by the <var>[[PemToString (String function)|PemToString]]</var> method. It has properties (<var>Line</var> and
__NOTOC__
<var>Position</var>) that indicate the line and position of the bad data.
The <var>InvalidPemData</var> exception class validates whether the data being processed by the called method conforms to the PEM (Privacy Enhanced Mail) protocol. PEM data is base64-encoded binary data.
The <var>InvalidPemData</var> class has properties that indicate the line and position of the non-conforming data.
A system method that throws this exception is <var>[[PemToString (String function)|PemToString]]</var>.
 
To produce an <var>InvalidPemData</var> exception for yourself, you typically use a <var class="product">User Language</var> <var>[[Exceptions#Throwing exceptions|Throw]]</var> statement calling the <var>InvalidPemData</var> <var>[[New_(InvalidPemData_constructor)|New]]</var> constructor:
<p class="code"> throw %(InvalidPemData):new
</p>
The methods of the <var>InvalidPemData</var> exception class are described below.
 
This class is available as of <var class="product">[[Sirius Mods]]</var> Version 8.0.
 
 
<h2>The InvalidPemData methods</h2>
{{Template:List of InvalidPemData methods}}
 
The methods in the class are described in the subsections that follow. In addition:
<ul>
<li>[[Notation conventions for methods|"Notation conventions for methods"]] has information
about the conventions followed.
<li>[[InvalidPemData methods syntax|"InvalidPemData methods syntax"]] is a single page that contains the syntax diagrams of the methods in the class.
</ul>
 
 
<h2>New constructor</h2>
{{Template:InvalidPemData:New subtitle}}
 
This method generates an instance of an <var>[[InvalidPemData_class|InvalidPemData]]</var> exception. The <var>New</var> method format is as follows:
 
<h3>Syntax</h3>
{{Template:InvalidPemData:New syntax}}
<h4>Syntax terms</h4>
<table class="syntaxTable">
<tr><th>%invalidPemData</th>
<td>A reference to an instance of a <var>InvalidPemData</var> object.</td></tr>
<tr><th><var>%(InvalidPemData)</var></th><td>The class name in parentheses denotes a <var>[[Notation conventions for methods#Constructors|Constructor]]</var>. See [[#Usage notes|"Usage notes"]], below, for more information about invoking a <var>InvalidPemData</var> <var>Constructor</var>.</td></tr>
</table>
 
<h3>Usage notes</h3>
<ul>
<li>As described in [[Object variables#Using New or other Constructors|"Using New or other Constructors"]], <var>New</var> can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is <var>Null</var>:<p class="code">%invalidPem = new
 
%invalidPem = %(InvalidPemData):new
 
%invalidPem = %invalidPem:new
</p>
</ul>
 
[[Category:System exception classes]]

Revision as of 21:26, 23 April 2012

The InvalidPemData exception class validates whether the data being processed by the called method conforms to the PEM (Privacy Enhanced Mail) protocol. PEM data is base64-encoded binary data. The InvalidPemData class has properties that indicate the line and position of the non-conforming data.

A system method that throws this exception is PemToString.

To produce an InvalidPemData exception for yourself, you typically use a User Language Throw statement calling the InvalidPemData New constructor:

throw %(InvalidPemData):new

The methods of the InvalidPemData exception class are described below.

This class is available as of Sirius Mods Version 8.0.


The InvalidPemData methods

The following are the available InvalidPemData class methods.

MethodDescription
LineLine where error encountered
NewCreate a new InvalidPemData object
PositionPosition in line where error encountered

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


New constructor

Create a new InvalidPemData object (InvalidPemData class)

[Introduced in Sirius Mods 8.0]

This method generates an instance of an InvalidPemData exception. The New method format is as follows:

Syntax

%invalidPemData = [%(InvalidPemData):]New( Line= number, Position= number)

Syntax terms

%invalidPemData A reference to an instance of a InvalidPemData object.
%(InvalidPemData)The class name in parentheses denotes a Constructor. See "Usage notes", below, for more information about invoking a InvalidPemData 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:

    %invalidPem = new %invalidPem = %(InvalidPemData):new %invalidPem = %invalidPem:new