CreateException
Mon 01 January 2018Syntax
CreateException(message_set, message_num, default_txt [, subslist])
where subslist is an arbitrary-length list of substitutions of undetermined (Any) data type to be substituted in the resulting text string, in the form:
substitution1 [, substitution2]. . .
Description
Use the CreateException function to create an exception object with the given properties. You can use this in your exception handling. Use this function either in conjunction with the throw statement, or on its own to get more information of a message.
Parameters
Field or Control |
Definition |
---|---|
message_set |
Specify the message set number of the message you want associated with this exception. |
message_num |
Specify the message number of the message you want associated with this exception. |
default_txt |
Specify the text you want associated with the exception if the message specified by message_set and message_num isn't found. |
subslist |
A comma-separated list of substitutions; the number of substitutions in the list is arbitrary. The substitutions are referenced in the message text using the % character followed by an integer corresponding to the position of the substitution in the subslist . The number of substitutions specified with this parameter are what get counted with the exception class SubsitutionCount property. |
Returns
A reference to an exception object if successful, Null otherwise.