InvalidPemData class: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 53: Line 53:
<td>A reference to an instance of a <var>InvalidPemData</var> object.</td></tr>
<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>
<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>
<tr><th><var>Line</var></th>
<td>This [[Methods#Named parameters|name required]] parameter: <var>Line</var>, specifies the numeric value (<var class="term">number</var>) for the line number to be assigned to the <var>InvalidBerData</var> exception object's <var>Line</var> property when a data error is encountered. </td></tr>
<tr><th><var>Position</var></th>
<tr><th><var>Position</var></th>
<td>This [[Methods#Named parameters|name required]] parameter: <var>Position</var>, specifies the numeric value (<var class="term">number</var>) for the position to be assigned to the <var>InvalidPemData</var> exception object's <var>Position</var> property when a data error is encountered.</table>
<td>This name required parameter: <var>Position</var>, specifies the numeric value (<var class="term">number</var>) for the position to be assigned to the <var>InvalidPemData</var> exception object's <var>Position</var> property when a data error is encountered.</table>


<h3>Usage notes</h3>
<h3>Usage notes</h3>

Revision as of 01:27, 24 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(line=1, position=13)

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:

Line property

Line where error encountered (InvalidPemData class)

[Introduced in Sirius Mods 8.0]

This ReadOnly property returns the line in the (expected) PEM data where a non-PEM-conforming character was found.

Syntax

%number = invalidPemData:Line

Syntax terms

%number This numeric value is the line in the data being validated where a non-PEM-conforming character was found.
invalidPemData A reference to an instance of an InvalidPemData object.

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.
Line This name required parameter: Line, specifies the numeric value (number) for the line number to be assigned to the InvalidBerData exception object's Line property when a data error is encountered.
Position This name required parameter: Position, specifies the numeric value (number) for the position to be assigned to the InvalidPemData exception object's Position property when a data error is encountered.

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(line=4, position=1) %invalidPem = %(InvalidPemData):new(line=4, position=1) %invalidPem = %invalidPem:new(line=4, position=1)

Position property

Position in line where error encountered (InvalidPemData class)

[Introduced in Sirius Mods 8.0]

This ReadOnly property returns the position in the (expected) base64-encoded string where a non-PEM-conforming character was found.

Syntax

%number = invalidPemData:Position

Syntax terms

%number This numeric value is the position in the base64 string (in the line identified by the value of Line) where a non-PEM-conforming character was found.
invalidPemData A reference to an instance of an InvalidPemData object.