New (CharacterTranslationException constructor)

From m204wiki
Jump to navigation Jump to search

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 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