How to use MrDump
Real easy!
──────────────────────────────────────────────────────────────────────────────
Syntax
MrDump( <cFileName> [,<nFlags>] ) --> lSuccessful
Arguments
cFileName - refers to the name of a filefor the output
nFlags - refers to options to send to the dump file
Returns
.T. if successful
.F. otherwise
Description
MrDump() may be used by you in your error system to dump the contents of
various items (controlled by you) to the log file.
MrDump takes two parameters, the first is the filename for the crash log
to be written to. This is NOT optional.
The second, optional, parameter is a list of items that you wish to
include in the dump file. Omit this parameter and MrDump will assume
that you want all options to be sent to the dump file.
The options may be individually set by adding together the indvidual
items that you wish to set. MRDUMP.CH has been included with Manifest
constants for easier reading. It contains:
MRDUMP_APPEND 1
MRDUMP_ERROR 2
MRDUMP_STACK 4
MRDUMP_VARIABLES 8
MRDUMP_IN_SCOPE 16
MRDUMP_WORKAREAS 32
MRDUMP_SCREEN 64
MRDUMP_SOURCE 128 // Only applicable with MrDebug
Note
■ MrDump.LIB must be linked in as a FILE. So don't forget to include
the .LIB extention. ie. FI MrDump.LIB
Example
■ This example dumps the stack and just variables in scope:
MrDump( "Myapp.log", MRDUMP_STACK+MRDUMP_IN_SCOPE+MRDUMP_VARIABLES )
Files: Library is MRDUMP.LIB.