InvalidPemData class: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 48: Line 48:
</p>
</p>
</ul>
</ul>
<h2>Position property</h2>
{{Template:InvalidPemData:Position subtitle}}
This <var>[[Classes and Objects#readWrite|ReadOnly]]</var> property returns the position in the (expected) base64-encoded string where a non-PEM-conforming character was found.
<h3>Syntax</h3>
{{Template:InvalidPemData:Position syntax}}
<h4>Syntax terms</h4>
<table class="syntaxTable">
<tr><th>%number</th>
<td>This numeric value is the position in the base64 string where a non-PEM-conforming character was found.
</td></tr>
<tr><th>invalidPemData</th>
<td>A reference to an instance of an <var>InvalidPemData</var> object.
</td></tr></table>


[[Category:System exception classes]]
[[Category:System exception classes]]

Revision as of 22:02, 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

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 where a non-PEM-conforming character was found.
invalidPemData A reference to an instance of an InvalidPemData object.