Share via


Error Object Foundation Class

Category Application
Default Catalog Visual FoxPro Catalog\Foundation Classes\Application
Class _error
Base Class Custom
Class Library _app.vcx
Parent Class _custom
Sample ...\Samples\Solution\Ffc\error.scx

Remarks

This class is a generic error handler that works for both object and procedural code. This class is used with an application framework generated by the Application Wizard.

To use, drop the class on a project or form or, from the Component Gallery Item Shortcut Menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class icon on the form. You can then specify the appropriate property values and access its functionality from input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classes for more information on using foundation classes.

Properties, Events, Methods Description
GetMessageBoxTitle method Returns the truly active control,
loRealActiveControl, in cases where the
current active control is a Grid.
Syntax: GetActiveControlRef(toActiveControl)
Return:ERROR_MESSAGEBOX_TITLE_LOC
Arguments: none
cCurrentMessage property. Specifies the error message.
Default: ""
cCurrentMethod property Specifies the method in which the error
occurred.
Default: ""
iCurrentError property Specifies the error number.
Default: 0
iCurrentLine property Specifies the line in which the error
occurred.
Default: 0
cCurrentClass   property Specifies the error classification that the
error object specifies for this particular
error number.
Default: ""
lServer property    Checks _VFP.StartMode to determine
whether any sort of modal feedback should
be avoided because of the way Visual
FoxPro was started.
Default: (BETWEEN(_VFP.StartMode,1,3)))
cLogAlias property Specifies the name of the log alias.
Default: ""
cLogDBF property Specifies the name of log file (DBF) that is
built by the _error object.
Default: ""
lUserCancelled property Allows the outside program to perform any
necessary cleanup operations before
release.
Default: .F.
HandleMain method The routine that handles the error.
Syntax: HandleMain(tiError, tcMethod,
tiLine)
Return: none
Arguments:
tiError specifies the error number.
tcMethod specifies the name of the current
method.
tiLine specifies the number of the current
line.
OKToReport method Abstract class to evaluate whether to report
error.
Syntax: OKToReport( )
Return: none
Arguments: none
isTrivial method Specifies whether an error is a trivial error.
Syntax:IsTrivial(tlWantDialog box)
Return: none
Arguments:
tlWantDialog box specifies an optional dialog box to
display.
isFatal method    Specifies whether an error is a fatal error.
Syntax:( )
Return:
Arguments:
tlWantDialog box specifies an optional dialog box to
display.
GetMessageBoxTitle method    This is meant for your subclass or instance
to fill out with application-specific
information.
Syntax: GetMessageBoxTitle( )
Return: none
Arguments: none
DisplayErrorLog method    Displays the error log.
Syntax: DisplayErrorLog( )
Return: none
Arguments: none
OKToContinue method    Evaluates an error to determine whether to continue program execution.
Syntax: OKToContinue( )
Return: none
Arguments: none
SetLog    method Determines the name of or creates the
error log table and alias.
Syntax: SetLog( )
Return:cLogAlias
The error log table has the following
format:
CREATE TABLE (THIS.cLogDBF) ;
   (errstamp       t, ;
   listing         m,;
   usernotes      m)
Arguments: none
cCurrentErrorParam property Internal to the class.
aErrorClass[1,3] property Internal to the class.
aErrors[1,6] property Internal to the class.
*FillArrays   . Internal to the class.
LogErrorReport method Internal to the class.
GetErrorAttribute method Internal to the class
isGoodErrorLog method Internal to the class.
UserHandlesError method Internal to the class.
UserCancelled method Internal to the class.
FillLogRecord method Internal to the class.
DoErrorLogUI method Internal to the class.

See Also

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Foundation Class Samples