New (CharacterTranslationException constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (match syntax table to syntax template, tags and edits)
mNo edit summary
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.
Each argument to <var>New</var> sets the value of the corresponding property of the newly constructed <var>CharacterTranslationException</var> object.
==Syntax==
==Syntax==
{{Template:CharacterTranslationException:New syntax}}
{{Template:CharacterTranslationException:New syntax}}

Revision as of 02:23, 18 April 2011

Create a new CharacterTranslationException object (CharacterTranslationException class) Each argument to New sets the value of the corresponding property of the newly constructed CharacterTranslationException object.

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