tcf (Try Catch Finally) v1.0 manual


NAME

exceptions - manages exceptions

SYNOPSIS

exceptions ?option? arg ?arg ...?

DESCRIPTION

Performs one of several exceptions operations, depending on option. The legal options (which may be abbreviated) are:

exceptions on
Switches the whole exceptions handling on. Only with an activated exceptions handling the try command could catch previously defined exceptions.

exceptions off
Switches the whole exceptions handling off. With a deactivated exceptions handling the try command could not catch previously defined exceptions.

exceptions reset
Resets the whole exceptions handling back. All defined exceptions are deleted.

exceptions read ?media? source

Reads exceptions from a given source from a given media. Legal values for the media are

-file
The given source-file would be read and interpretated to generate exceptions.

-string
The given source-string would be interpretated to generate exceptions.

-list
The given source-list would be interpretated to generate exceptions.

if the media is omitted the source is managed as file.

exceptions add exceptionname ?exceptionmessag? ?exceptioncode?
Adds an exception if not defined yet. Returns exceptionname.

exceptions def exceptionname ?exceptionmessag? ?exceptioncode?
Defines an exception. If it is defined yet, this exception will be changed. Returns exceptionname.

exceptions set exceptionname ?exceptionmessag? ?exceptioncode?
Defines an exception. If it is defined yet, this exception will be changed. Returns exceptionname.

exceptions del exceptionname ?exceptionname ...?
Deletes all given exceptions.

exceptions undef exceptionname ?exceptionname ...?
Deletes all given exceptions.

exceptions unset exceptionname ?exceptionname ...?
Deletes all given exceptions.

exceptions clear
Deletes all defined exceptions.

exceptions enableexceptionname ?exceptionname ...?
Enables all given exceptions. Enabled exceptions could be catched with the try-command.

exceptions disable exceptionname ?exceptionname ...?
Disables all given exceptions. Disabled exceptions could not be catched with the try-command.

exceptions change exceptionname exceptionmessage ?exceptioncode?
Changes the message and/or the code of the given exception. Returns exceptionname.

exceptions changecode exceptionname ?exceptioncode?
Changes the code of the given exception. Returns exceptionname.

exceptions changemessage exceptionname exceptionmessage
Changes the message of the given exception. Returns exceptionname.

exceptions info pattern
Returns all exception names matching the given pattern.

exceptions exceptioninfo exceptionname
Returns all definition data belonging to the given exception.

exceptions ison
Returns 1 if the exception handling is switch on.

exceptions isoff
Returns 0 if the exception handling is switch off.

exceptions current
Returns the name of the exception that is currently raised.

exceptions lastraised
Returns the name of the exception that is currently raised.

exceptions israised ?exceptionname?
Returns 1 if the given exception is the currently raised one. If no exception is given it returns 1 if an exception is raised.

exceptions exists pattern
Returns 1 if the given pattern matches with one or more exceptions.

exceptions iscatchable exceptionname
Returns 1 if the given exception is catchable or enabled.

exceptions catchnraise ?level? command exceptionname ?exceptionmessage? ?exceptioncode?

Executes the given command and catches an eventually raising error or exception. If an error occurs the given exception will be raised. If the given exception is not defined yet the exception will be defined. Returns the result of the command.

-level level
With this option try executes every command in the given level/scope. The level is the number of levels/scopes to step up from the current or with a leading # the absolute number of an existing level. The syntax is the same the command uplevel uses.

-global
With this option try executes every command in the global scope/context.

If the option level is omitted the given commands are executed in the current level/scope.

exceptions raise exceptionname ?exceptionmessage? ?exceptioncode?
Raises the given exception.

exceptions lower
Lowers the last raised exception.

LINKS

manual, try manualpage


bug descriptions, comments and ideas to: martin.lemburg@epost.de - December 1999