Method Error():setErrorMode() Foundation

Determine actions for error modes.

Syntax
Error():setErrorMode(<nMode>, [<nAction>]) --> <nCurrentAction>
Parameters
<nMode>
<nMode> is a numeric value which indicates the mode to configure. ERR_MODE_GC is the error mode of the garbage collector, ERR_MODE_GUI is the error mode of the event dispatching.
<nAction>
<nAction> is an optional numeric value which determines the new action for <nMode>. Available actions are ERR_ACTION_FATAL, ERR_ACTION_IGNORE and ERR_ACTION_POPUP.
Return

The class method :setErrorMode() returns the current action per mode.

Description

The Xbase++ runtime system runs several threads internally, like the Garbage Collector Thread. If an error occurs on one of these threads, it occurs asynchronously to the application threads. The default action is ERR_ACTION_IGNORE. In this case, the error will be recorded and it is tried to tolerate the error. The recorded error can be retrieved by calling :ignoredErrors().

If ERR_ACTION_POPUP is set, the Xbase++ runtime pops up a dialog to inform the user about the error. This is the preferred mode if the application is under development. ERR_ACTION_FATAL is the preferred action if an application is running unattended. This immediatley terminates the application leaving an error log called XPPFATAL.LOG in the current directory. A supervising script can restart the application if an XPPFATAL.LOG occured. In any event, the application should be terminated as soon as possible to prevent from possible data loss.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.