Exception Class Properties

In this section, we discuss the Exception class properties, in alphabetical order.

Description

This property returns a string description of the location of the condition in PeopleCode or other processing. This might contain a stack backtrace at the point of the exceptional condition.

This property is read-only.

Example

This is the “At” part of the error message display. For example, for an exception thrown in Record.Field Event QE_31DIGREC1.QE_31DIGFLD5 FieldChange function EachComp at PeopleCode program counter 671, statement 11 of the source program, the Context would be:

At QE_31DIGREC1.QE_31DIGFLD5.FieldChange EachComp   PCPC:671  Statement:11

Description

This property sets a string to use as the basic message text for the exception when the message can't be found in the message catalog.

This property is read/write.

Description

This property is the message number for a message describing the exceptional condition.

This property is read-only.

Description

This property is the message set number for a message describing the exceptional condition.

This property is read-only.

Description

This property is the message severity as a string for a message describing the exceptional condition. The message severity is set for the message when it's created in the message catalog. The values are:

Numeric Value

Constant Value

Description

C

%MsgSeverity_Cancel

Message severity is Cancel.

E

%MsgSeverity_Error

Message severity is Error.

M

%MsgSeverity_Message

Message severity is Message.

W

%MsgSeverity_Warning

Message severity is Warning.

This property is read-only.

Description

This property returns a string with the complete stack trace. This includes the whole context, (that is, current location + called from X + called from. . . )

You can process the returned string by breaking it into pieces using the Split function, and using "Called from" as the value to use for separating the string. For example,

Local Array of String &Pieces;

/* get exception */

&Pieces = Split(&E.StackTrace, "Called from:");

This property is read-only.

Example

The following is an example of a trace stack.

In C (0,0) AEMINITEST.MAIN.GBL.default.1900-01-01.Step02.OnExecute  Name:C  PCPC
:136  Statement:2
Called from:AEMINITEST.MAIN.GBL.default.1900-01-01.Step02.OnExecute  Name:B  Sta
tement:6
Called from:AEMINITEST.MAIN.GBL.default.1900-01-01.Step02.OnExecute  Name:A  Sta
tement:13
Called from:AEMINITEST.MAIN.GBL.default.1900-01-01.Step02.OnExecute  Statement:1
8

Description

This property returns the number of substitution strings in the message text as a number.

The number of substitutions comes from the subslist of the CreateException function.

This property is read-only.