New (CharacterTranslationException constructor)

From m204wiki
Revision as of 05:37, 15 April 2011 by Goff (talk | contribs) (match syntax table to syntax template, tags and edits)
Jump to navigation Jump to search

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