xHarbour Reference Documentation > Function Reference |
Creates a new Error object and optionally fills it with data.
ErrorNew( [<cSubSystem> ], ; [<nGenCode> ], ; [<nSubCode> ], ; [<cOperation> ], ; [<cDescription>], ; {<aArgs> ], ; [<cModuleName> ], ; [<cProcName> ], ; [<nProcLine> ] ) --> oError
The function returns the new Error object with the passed parameters assigned to instance variables.
ErrorNew() creates a new Error object and optionally assigns the parameters passed to instance variables of the object. The function is automatically called by the xHarbour runtime system when a runtime error occurs. User defined routines can create their own Error objects and fill them with error information. The Error object is then passed to the error code block (see ErrorBlock()) or to the Throw() function.
Error objects are instances of the Error() class. Refer to that class for more information on creating user defined Error objects.
See also: | Error(), ErrorBlock(), Throw(), TRY...CATCH |
Category: | Error functions , Object functions |
Header: | error.ch |
Source: | rtl\terror.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// refer to the Error() class for an Error object example
http://www.xHarbour.com