New (CharacterTranslationException constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (match syntax table to syntax template, tags and edits)
Line 1: Line 1:
{{Template:CharacterTranslationException:New subtitle}}
{{Template:CharacterTranslationException:New subtitle}}
 
This <var>New</var> constructor generates an instance of a <var>[[CharacterTranslationException_class|CharacterTranslationException]]</var> exception object. The <var>New</var> method arguments may be used to set the values of the properties of the class that have the corresponding names.
This constructor generates an instance of a CharacterTranslationException exception.
As shown in the syntax that follows,
the New method arguments set the values of the properties of the class that have the
corresponding names.
==Syntax==
==Syntax==
{{Template:CharacterTranslationException:New syntax}}
{{Template:CharacterTranslationException:New syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%chTransEx</th>
<tr><th>%characterTranslationException</th>
<td>A reference to an instance of a CharacterTranslationException object.
<td>A reference to the newly created instance of a <var>[[CharacterTranslationException_class|CharacterTranslationException]]</var> object.
</td></tr>
</td></tr>
<tr><th>Reason=reasonEnum</th>
<tr><th>Reason</th>
<td>This name required parameter specifies the value to be assigned to the exception object's <var>[[Reason (CharacterTranslationException property)|Reason]]</var> property. As described in for the <var>Reason</var> property, the ''reasonEnum'' enumeration values are <code>InvalidEncoding</code>, <code>InvalidCharacterReference</code>, and <code>UntranslatableCharacter</code>.
<td><var>Reason</var> is a <b><i>non-</i></b>optional, <var>[[Methods#Named parameters|Name-Required]]</var> parameter specifying the value to be assigned to the exception object's <var>[[Reason (CharacterTranslationException property)|Reason]]</var> property.
The <var>Reason</var> parameter is '''not''' optional.
<p>As described in for the <var>[[Reason_(CharacterTranslationException_property)#Usage_notes|Reason]]</var> property, the <var>translationExceptionReason</var> enumeration values are <code>InvalidEncoding</code>, <code>InvalidCharacterReference</code>, and <code>UntranslatableCharacter</code>.</p></td></tr>
<tr><th>HexValue</th>
<td>This <var>name-required</var> parameter specifies the string value (<var class="term">%string</var>) to be assigned to the object's <var class="term">[[HexValue_(CharacterTranslationException_property)|HexValue]]</var> property.
</td></tr>
</td></tr>
<tr><th>BytePosition=num</th>
<tr><th>BytePosition</th>
<td>This name required parameter specifies the numeric value (''num'') to be assigned to the object's BytePosition property.
<td>This <var>name-required</var> parameter specifies the numeric value (<var class="term">%number</var>) to be assigned to the object's <var class="term">[[BytePosition_(CharacterTranslationException_property)|BytePosition]]</var> property.
</td></tr>
</td></tr>
<tr><th>CharacterPosition=num</th>
<tr><th>CharacterPosition</th>
<td>This name required parameter specifies the numeric value (''num'') to be assigned to the object's CharacterPosition property.
<td>This <var>name-required</var> parameter specifies the numeric value (<var class="term">%number</var>) to be assigned to the object's <var class="term">[[CharacterPosition_(CharacterTranslationException_property)|CharacterPosition]]</var> property.
</td></tr>
</td></tr>
<tr><th>Description=string</th>
<tr><th>Description</th>
<td>This name required parameter specifies the string value (''string'') to be assigned to the object's Description property.
<td>This <var>name-required</var> parameter specifies the string value (<var class="term">%string</var>) to be assigned to the object's <var class="term">[[Description_(CharacterTranslationException_property)|Description]]</var> property.
</td></tr>
</td></tr>
<tr><th>HexValue=string</th>
</table>
<td>This name required parameter specifies the string value (''string'') to be assigned to the object's HexValue property.


</td></tr></table>
==See also==
==See also==
{{Template:CharacterTranslationException:New footer}}
{{Template:CharacterTranslationException:New footer}}

Revision as of 05:37, 15 April 2011

Create a new CharacterTranslationException object (CharacterTranslationException class) This New constructor generates an instance of a CharacterTranslationException exception object. The New method arguments may be used to set the values of the properties of the class that have the corresponding names.

Syntax

%characterTranslationException = [%(CharacterTranslationException):]New( Reason= translationExceptionReason, - [HexValue= string], - [BytePosition= number], - [CharacterPosition= number], - [Description= string])

Syntax terms

%characterTranslationException A reference to the newly created instance of a CharacterTranslationException object.
Reason Reason is a non-optional, Name-Required parameter specifying the value to be assigned to the exception object's Reason property.

As described in for the Reason property, the translationExceptionReason enumeration values are InvalidEncoding, InvalidCharacterReference, and UntranslatableCharacter.

HexValue This name-required parameter specifies the string value (%string) to be assigned to the object's HexValue property.
BytePosition This name-required parameter specifies the numeric value (%number) to be assigned to the object's BytePosition property.
CharacterPosition This name-required parameter specifies the numeric value (%number) to be assigned to the object's CharacterPosition property.
Description This name-required parameter specifies the string value (%string) to be assigned to the object's Description property.

See also