home *** CD-ROM | disk | FTP | other *** search
- * ┌─────────────────────────────────────────────────────────────────────┐ *
- * │ PROG NAME: SYSERROR.PRG │ *
- * │ Copyright (c) 1989,1990 Tech III, Inc. All rights reserved. │ *
- * │ Tech III of San Pedro, California (213) 547-2191. │ *
- * │ "The bridge connecting people and technology."(tm) │ *
- * └─────────────────────────────────────────────────────────────────────┘ *
- parameters PROGNAME, ERR_LINE
- private PROGNAME, ERR_LINE
- on error
- define window SYSERROR from 05,01 to 16,78 float grow zoom close color scheme 7
- activate window SYSERROR
- set device to screen
- set console on
- set printer off
- clear gets
- store 'Retry ' to NEXTSTEP
- set bell on
- ?? chr(07)
- ?? chr(07)
- ?? chr(07)
- set bell off
- @ 00,01 say ' A PROGRAM ERROR HAS BEEN ENCOUNTERED!'
- @ 02,01 say ' ERROR NUMBER: ' + ltrim(str(error(),5))
- @ 03,01 say ' ERROR MESSAGE: ' + left(message(),75)
- @ 04,01 say 'EXECUTING LINE: ' + ltrim(str(ERR_LINE,5))
- @ 05,01 say ' ERROR LINE: ' + ltrim(message(1))
- @ 06,01 say ' IN PROGRAM: ' + PROGNAME
- @ 08,01 say 'Retry / Continue / Suspend / Edit / Cancel / Quit ?: ' get NEXTSTEP ;
- picture '@M Retry ,Continue,Suspend ,Edit ,Cancel ,Quit '
- read
- do case
- case NEXTSTEP = 'Retry'
- release window SYSERROR
- retry
- case NEXTSTEP = 'Continue'
- release window SYSERROR
- case NEXTSTEP = 'Suspend'
- release window SYSERROR
- on error
- suspend
- case NEXTSTEP = 'Edit'
- release window SYSERROR
- if .not. file(PROGNAME+ '.prg')
- do STANDBY with 'This system seems to think the program is: ' + PROGNAME
- modify command
- else
- modify command (PROGNAME+ '.prg')
- endif
- case NEXTSTEP = 'Cancel'
- deactivate window SYSERROR
- store .F. to IN_SYSTEM
- release window SYSERROR
- deactivate menu
- case NEXTSTEP = 'Quit'
- release window SYSERROR
- quit
- otherwise
- release window SYSERROR
- endcase
- store 'SYSERROR' to ERR_RTN
- on error do &ERR_RTN with program(), lineno()
- return
-