An object that describes an exception condition.

Syntax

[<oRef> =] new Exception( )

<oRef>

A variable or property in which to store a reference to the newly created Exception object.

Properties

The following table lists the properties of the Exception class. (No events or methods are associated with this class.)

Property

Default

Description

baseClassName

EXCEPTION

Identifies the object as an instance of the Exception class

className

(EXCEPTION)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

code

0

A numeric code to identify the type of exception

filename

 

The name of the file in which a system-generated exception occurs

lineNo

0

The line number in the file in which a system-generated exception occurs

message

 

Text to describe the exception

 

Description

An Exception object is automatically generated by dBASE Plus whenever an error occurs. The objectís properties contain information about the error.

You can also create an Exception object manually, which you can fill with information and THROW to manage execution or to jump out of deeply nested statements.

You may subclass the Exception class to create your own custom exception objects. A TRY block may be followed by multiple CATCH blocks, each one looking for a different exception class.