Modifying your error system
Changes to ErrorSys.
──────────────────────────────────────────────────────────────────────────────

To take full advantage of the features that MrDebug offers, you should make
two changes to your source code.

1. Add the following line to your error system:

MrdSaveErr( oError )

In the case of ErrorSys.PRG this would be the first line of code
within the DefError Function. So you would want to insert a line
of code around line 46'ish that says:

MrdSaveErr( e )

This allows MrDebug to display the output of any CA-Clipper error
in it's own window.

2. Replace all STDOUT calls in either the standard error system or
your error system with ?

If you have not made any changes to the standard error system, then you may
choose to use MrDebug's replacement error system instead. In which case, you
will need to compile and link _MrdErSy.prg.

Why the changes?

Let us take an example:

LOCAL a := 1
LOCAL b := "string"

? a + b

Okay, so it's no award-winning program, but it will serve to make a point.

With the above changes in your error system ┌──────────────────┐
you will be able to take advantage of the │ Error Base/1081 │
facilities for the error system that MrDebug │ Argument error │
has the ability to use. In the above code │ 1 + "string" │
example, when it falls over you get an ALERT() │ │
box similar to the one on the right. When you Quit
come out of the alert the error window will └──────────────────┛
automatically be selected and will display
something similar to the example shown below:

┌─ 8 Error ────────────────────────────┐ Here we can see the error window
Severity:Error │ with the an example of the error
Error Code:BASE/1081 │ that would occur with the code
Description:Argument error │ shown above.
Operation:1 + "string" │
│ │ You could view the actual error
└──────────────────────────────────────┛ object by pressing <ENTER>.

Pressing the <ENTER> would cause MrDebug to call the object browser and you
would see the following:

┌─────────────────┬────────── Error Object ─────────────────────────────┐
Object Browser Variables Contents
ERROR ↑ARGS E--- {1...2}
CANDEFAULT E--- .F.
CANRETRY E--- .F.
CANSUBSTIT E--- .T.
CARGO E--- NIL
DESCRIPTIO E--- "Argument error"
FILENAME E--- ""
├─────────────────┤GENCODE E--- 1
Methods OPERATION E--- "+"
CLASSNAME OSCODE E--- 0
SEVERITY E--- 2
SUBCODE E--- 1081
SUBSYSTEM E--- "BASE"
TRIES E--- 0

└─────────────────┴─────────────────────────────────────────────────────┛