ERROR HANDLER........The dCLIP Error Handler Program
ERROR WINDOW.........The dCLIP Error Window
OBJECT TOO BIG.......OBJECT TOO BIG Error

ERROR HANDLER

The dCLIP Error Handler Program

Description:

The program file _DCERROR.PRG is the dCLIP error handler.
This object is located in the DCLIP.LIB library and will
replace the Clipper error handler if the DCLIP.LIB library
is linked before the CLIPPER.LIB library or if there is
a call in your application code to the DC_ERROR() function.

DC_ERROR() is the dCLIP error-block and this error handler
is installed when dCLIP starts up. If you wish to use
your own error handler, then you must activate your error
system with the Clipper ERRORBLOCK() function as follows:

// save current error handler
bSaveError := ErrorBlock()

// load custom error handler
bMyError := { |e| myError(e) }
ErrorBlock( bMyError )

// run application
DO myapp

// restore dCLIP error handler
ErrorBlock( bSaveError )

See Also:

dc_error()

ERROR WINDOW

The dCLIP Error Window

Description:

dCLIP uses the modifyable features of the Clipper error
handling system to trap most errors and display them on the
screen. This includes expression errors, opening file n
errors, printer errors, network file and record locking
errors, unresolved procedure call errors, etc.

When an error occurs, you sometimes will be allowed to
correct the error condition and continue processing. For
example, if a data file cannot be found, you will be
prompted to enter a search path, or if a printer device is
not ready you will be prompted to enter a different device
or output to a file.

The dCLIP Error Window is displayed whenever a Clipper
error occurs. See the below example.

ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Variable does not exist INV_NMBR BASE[1003] º
º Procedure TEST2 Line number 6 º
º Called from TEST2(6) º
º Called from TEST(214) º
º Called from DCLIP(0) º
º º
º ENTER = BREAK out of program º
º B = BREAK to next END SEQUENCE º
º S = Call DOS Shell º
º C = Retry & Continue º
º Q = QUIT to DOS º
º D = Call Debugger Dot Prompt º
º V = View SOURCE code º
º E = Edit and Compile current program º
º L = Write status to Log file º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ


-- ENTER = BREAK out of program --

Pressing the (ENTER) or (ESCAPE) key will ignore the error,
BREAK out of your application, and return you to the Dot
Prompt if your application was started from the Dot Prompt,
or return to DOS if the application was started from DOS.
This uses a feature of dCLIP that sets a BREAK INTERRUPT
to force a BREAK out of all nested BEGIN SEQUENCE..END
SEQUENCE structures. This feature will work only if the
code being executed was compiled with the /B switch.


-- B = BREAK to END SEQUENCE --

Pressing key (B) will issue a BREAK to position you at
the next END SEQUENCE command in your application program.
If you do not use any BEGIN..END SEQUENCE commands in your
program, then pressing key (B) will return you to the Dot
Prompt if that application was started from the Dot Prompt
otherwise it will return to DOS.


-- S = Call DOS Shell --

Pressing key (S) will call the DOS shell to allow you
to try to correct any DOS environment problem, such as
copying files to a different directory, selecting a
different directory, etc. To return back to the error
handler from DOS, type EXIT at the DOS prompt.


-- D = Call Debugger Dot Prompt --

Pressing key (D) will call the dCLIP interactive debugger
program to allow you to make changes to your Clipper
environment and continue the execution of the program.
From the Dot Prompt, you may BROWSE, USE, EDIT files, create
or modify memvars, or set step/watch points to invoke the
source-level debugger. Press (ENTER) with an empty command
line to return back to your program.


-- C = Retry and Continue --

Pressing the (C) key will continue the execution of the
program. If the error condition is not corrected, you will
be returned back to the error handler. This option is for
errors such as a disk full, bad floppy disk, etc. You can
correct the error, then press (C) to retry.


-- Q = QUIT to DOS --

Pressing the (Q) key will QUIT the application program and
the dCLIP program, close all files and return to DOS.


-- V = View SOURCE code (SET STEP ON) --

Pressing the (V) key will put the application into the STEP
mode of operation to allow you to single-step through your
application. You must correct the error condition however,
or you will be returned to the error handler.


-- E = Edit and Compile current program --

Pressing the (E) key will call your editor with the current
line number and place you in your source code to correct
the error. Upon returning from your editor, the changes
will be re-compiled and you will be returned to the dot
prompt. The program that errors must have been compiled
with the /B switch and there must have been a MAP (.LST)
file previously loaded into memory to find the .PRG file
that contains the erroring procedure, or the program must
have been dynamic-linked into memory.

NOTE: To use this feature, you must first include the:

EDIT=(editor),(memory),(swap drive)

command in your DCLIP.SYS file. See CONFIGURATION.


-- L = Write Status to Log File --

Pressing the (L) key will write the current status of
the running application to a log file. The information
written will be ASCII text and will include the following:

Date and Time
Error Information
Procedure Name
Line Number
Source File Name
Current screen contents (text format)
Current system status (SETs, work areas, etc.)
Current memvars in use

The default name of the log file is DCLIP.LOG. A window
will pop-up with the option to type in a different log file
name and (O)verwrite or (A)ppend to the file.

See Also:

dc_error()

OBJECT TOO BIG

OBJECT TOO BIG Error

Description:

An OBJECT TOO BIG error is caused by trying to link an
object module (.OBJ file) which is larger than the largest
continuous memory block available in the dynamic-link pool.
See the DC_CONMEM() function for more information. The
amount of DC_CONMEM() must be twice as much as the object
size plus 4K.

If you get this error often when running an application
you should do one or more of the following:

1. Allocate more memory to the "dynamic-linker" object
pool with the SET CLIPPER(memory in K) command at DOS
before running dCLIP or your application.

2. Add a FLUSH=(memory) command to your DCLIP.SYS file to
tell the dynamic-linker to flush the OBJECT pool each
time it loads a new module if the pool has less than
(memory)K of total free memory.

3. Reduce the size of your object modules. dCLIP runs
more efficiently if you have many objects of small
size rather than few objects of large size.

4. Structure your program so that objects can be
automatically released from memory when they are no
longer needed, (ie, you returned from the function
or procedure within that object). Programs which
do nested calls to many objects will have more
memory problems than programs which call objects
then return to a calling program.

EXAMPLES:

Nested Calls Structured Calls
(Requires more memory) (Requires less memory)
------------ -----------------
A calls B A calls B
B calls C B calls C
C calls D B calls D
D calls E A calls E
E calls F E calls F
F calls G E calls G
G calls H E calls H


-- MODULE TOO BIG --

Your application is trying to link an object module
from a dynamic library which is larger than the largest
continuous memory block available. See the DC_CONMEM()
function for more information. The amount of DC_CONMEM()
must be 2k larger than the object in the dynamic library.

See Also:

OBJ LOAD
dc_objload()