home *** CD-ROM | disk | FTP | other *** search
- *⌐░⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐┤
- *⌐ª Program: ERR_PRO.PRG ⌐ª
- *⌐ª Function: ┤φ╬≤┤ª└φ╫╙│╠╨≥╚² ⌐ª
- *⌐╕⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐╝
- PARAMETERS errlineno, errprog, errmsg, errline, errno, ;
- lastwind, readwind, topwind, readno
- * errlineno ╬¬╖ó╔·┤φ╬≤╡─│╠╨≥╨╨║┼
- * errprog ╬¬╡▒╟░╒²╘┌╓┤╨╨╡─│╠╨≥├√
- * errmsg ╬¬┤φ╬≤╨┼╧ó
- * errline ╬¬╖ó╔·┤φ╬≤╡─│╠╨≥╨╨
- * errno ╬¬┤φ╬≤┤·║┼
- * lastwind ╙├╙┌┼╨╢╧╥╗╕÷┤░┐┌╩╟╖±╩╟╡▒╟░┤░┐┌╡─╟░╥╗╕÷┤░┐┌
- * readwind ╙├╙┌┼╨╢╧╥╗╕÷┤░┐┌╩╟╖±╙δ╡▒╟░╡─ READ ╙╨╣╪
- * topwind ╙├╙┌┼╨╢╧╥╗╕÷┤░┐┌╩╟╖±╩╟╫ε╟░├µ╡─┤░┐┌
- * readno ╬¬ READ ╦∙╘┌▓π╩²
-
- PRIVATE lowmem, errstr, memscreen, no_files
- PRIVATE ALL LIKE ????_errs
- PRIVATE ALL LIKE err????
-
- errpset = _PDSETUP
- errtalk = SET("TALK")
- errsafe = SET("SAFETY")
-
- SET TALK OFF
- SET PDSETUP TO ""
-
- * ╖ó╔·┤φ╬≤╧∞│ñ╢╠┴╜╔∙┴σ╔∙▒¿╛»
- SET BELL TO 328,3
- ?? CHR(7)
- SET BELL TO 261,8
- ?? CHR(7)
- SET BELL TO
-
- errstr = "/" + ltrim(str(errno)) + "/"
-
- * ┐╔╙├╡─╩ú╙α─┌┤µ╨í╙┌ 10 KB
- lowmem = (val(sys(1001))-val(sys(1016)) < 10000)
-
- * ░╤┤φ╬≤╖╓│╔╛┼╓╓▓╗═¼╡─└α╨═, ─π┐╔└⌐│Σ╨▐╕─
- memo_errs = "/43/1012/1149/1150/1151/1600/"
- indx_errs = "/5/19/20/114/1707/"
- disk_errs = "/1410/"
- file_errs = "/1/15/41/111/1115/1294/1643/1644/1705/"
- netw_errs = "/124/1705/"
- lock_errs = "/3/108/109/110/1502/1708/"
- prtr_errs = "/125/"
- drvr_errs = "/1910/1643/1644/1717/"
- prgm_errs = "/9/10/11/13/16/30/31/34/36/37/42/44/45/46/47" + ;
- "/94/95/96/101/103/104/107/112/152/164/165/166" + ;
- "/167/168/169/170/174/175/176/177/178/179/181/182" + ;
- "/216/221/230/279/287/355/1001/1206/1211/1212/1213" + ;
- "/1214/1217/1220/1221/1223/1225/1226/1229/1230/1231" + ;
- "/1232/1238/1241/1249/1250/"
-
- * ╢¿╥σ╥╗╕÷┤φ╬≤╨┼╧ó╧╘╩╛┤░┐┌
- DEFINE WINDOW WIN_E1 FROM 9,5 TO 20,75 SHADOW COLOR SCHEME 7
-
- ACTIVATE WINDOW WIN_E1
- @0,2 SAY " ╖ó╔·┤φ╬≤╡─│╠╨≥╨╨║┼: "+LTRIM(STR(errlineno))
- @1,2 SAY " ╖ó╔·┤φ╬≤╡─│╠╨≥├√│╞: "+errprog
- @2,2 SAY " ┤φ╬≤╨┼╧ó: "+errmsg
- @3,2 SAY " │÷┤φ│╠╨≥╨╨─┌╚▌: "+errline
- @4,2 SAY " ┤φ╬≤┤·┬δ: "+LTRIM(STR(errno))
- @5,2 SAY " ╡▒╟░┤░┐┌╡─╟░╥╗┤░┐┌: "+lastwind
- @6,2 SAY "┤░┐┌╙δ╡▒╟░READ╙╨╣╪╖±: "+IIF(readwind,'╙╨╣╪','╬▐╣╪')
- @7,2 SAY " ┤░┐┌╩╟╖±╫ε╟░├µ┤░┐┌: "+topwind
- @8,2 SAY " READ ╦∙╘┌▓π╩²: "+LTRIM(STR(readno))
-
- WAIT " ░┤╚╬╥╗╝ⁿ╝╠╨°! " WINDOW
- DEACTIVATE WINDOW WIN_E1
-
- IF errstr $ prtr_errs
- err_ask = ASK(" ┤≥╙í╗·├╗╙╨╫╝▒╕║├; RETURN or CANCEL?",;
- "RETRY ","@M RETRY, CANCEL")
- SET TALK &errtalk
- SET PDSETUP TO errpset
- SET SAFETY &errsafe
- IF "R" $ err_ask
- RETRY
- ELSE
- RETURN
- ENDIF
- ENDIF
-
- IF errstr $ lock_errs
- err_ask = ASK("╝╟┬╝/╬─╝■╘┌╩╣╙├; RETRY or CANCEL?",;
- "RETRY ","@M RETRY, CANCEL")
- SET TALK &errtalk
- SET PDSETUP TO errpset
- SET SAFETY &errsafe
- IF "R" $ err_ask
- RETRY
- ELSE
- got_cancel = .T.
- RETURN
- ENDIF
- ENDIF
-
- WAIT CLEAR
- SET COLOR OF SCHEME 5 TO SCHEME 7
- no_files = .F.
-
- DO CASE
- CASE UPPER(errprog) = "FILEOPEN"
- * ╬─╝■┤≥┐¬┤φ╬≤, ┐╔╘┌┤╦╫≈┤≥┐¬╧╡═│╦∙╨Φ╡─╚½▓┐╬─╝■╥╘╣⌐╤í╘±╡──ú┐Θ,
- * ╗≥╜¿┴ó├╗╒╥╡╜╡─╬─╝■╡╚
-
- CASE errstr $ prgm_errs
- * ░╤╨Φ╥¬╓╕╢¿╡─┐╔─▄╖ó╔·╡─▒α│╠┤φ╬≤║═┤ª└φ╖┼╘┌╒Γ└∩, ▓ó═╦│÷┤φ╬≤┤ª
- * └φ│╠╨≥, ╚⌠▓╗═╦│÷, ┤φ╬≤╨┼╧ó╜½┤µ╚δ ERRLOG.DBF ║═ ERRLOG.FPT
- * ╓╨, ╣⌐─π╖╓╬÷╤╨╛┐
-
- CASE errstr $ indx_errs
- WAIT WINDOW NOWAIT "╔╛│²┤φ╬≤╡─╦≈╥²╬─╝■, ╓╪╜¿╦≈╥²..."
- ON ERROR
- ON ERROR DO ERR_PRO WITH LINENO(1), PROGRAM(), ;
- MESSAGE(), MESSAGE(1), ERROR(), ;
- WLAST(), WREAD(), WONTOP(), RDLEVEL()
- WAIT CLEAR
-
- CASE errstr $ drvr_errs
- * ╢╘┤≥╙í╔Φ▒╕│÷┤φ╡─┤ª└φ
-
- CASE errno = 1309
- WAIT WINDOW " │╠╨≥╬─╝■╙╨╬╩╠Γ, ╟δ╓╪╨┬░▓╫░."
- ENDCASE
-
- * ╝∞▓Θ▓╗─▄┤µ╚δ ERRLOG.DBF ╓╨╡─▓╗┐╔╗╓╕┤╡─┤φ╬≤
- IF no_files OR lowmem OR INLIST(errno, 1309, 56) && make your own list!
- WAIT WINDOW UPPER(PROGRAM(0))+;
- " ▓╗─▄┤╙╒Γ╕÷┤φ╬≤╗╓╕┤, ╟δ░┤╚╬╥╗╝ⁿ═╦│÷│╠╨≥"
- CLOSE ALL
- ERASE (m.oldvue)
- QUIT
- ENDIF
-
- WAIT WINDOW "╖ó╔·│╠╨≥└²═Γ, ╜½░╤╙╨╣╪┤φ╬≤╨┼╧ó╨┤╡╜ ERRLOG.DBF ╓╨ "
- err_sel = SELECT()
- err_rec = RECNO()
-
- * ░╤╧Ω╧╕╡─│÷┤φ╨┼╧ó╨┤╚δ ERRLOG.DBF ┐Γ└∩
- IF USED("errlog")
- SELECT errlog
- ELSE
- IF FILE("errlog.dbf") AND FILE("errlog.fpt")
- SELECT 0
- USE errlog
- ELSE
- * ╚τ errlog.dbf ║═ errlog.fpt ▓╗┤µ╘┌, ╘≥╓╪╨┬╜¿┴ó
- CREATE TABLE errlog ;
- (ERRDATE D(8), ;
- ERRTIME C(8), ;
- SNAPSHOT M(10),;
- UNDERNEATH M(10),;
- LISTING M(10),;
- USERNOTES M(10))
- ENDIF
- ENDIF
- APPEND BLANK
- SAVE WINDOWS ALL TO MEMO snapshot
- ACTIVATE SCREEN
- SAVE SCREEN TO memscreen
- SAVE ALL LIKE memscreen TO MEMO underneath
-
- REPLACE errdate WITH DATE(), errtime WITH TIME()
- * ┤µ╚δ╖ó╔·┤φ╬≤╡─╚╒╞┌║═╩▒╝Σ
-
- errdata = '┤φ╬≤┤·┬δ ='+ALLTRIM(STR(errno))
- errdata = errdata+CHR(13)+'┤φ╬≤╨┼╧ó = '+errmsg
- errdata = errdata+CHR(13)+'╫ε║≤╡─┤φ╬≤┤·▓╬╩² = '+SYS(2018)
- errdata = errdata+CHR(13)+'│╠╨≥├√│╞ = '+ errprog
- errdata = errdata+CHR(13)+'┤φ╬≤│╠╨≥╨╨║┼ = '+;
- ALLTRIM(STR(errlineno))+": "+errline
- REPLACE listing WITH errdata
-
- errdata = CHR(13)+'bof='+IIF(BOF(),"YES","NO")
- errdata = errdata+CHR(13)+ 'eof='+IIF(EOF(),"YES","NO")
- errdata = errdata+CHR(13)+'last window='+lastwind
- errdata = errdata+CHR(13)+'top window '+IIF(EMPTY(topwind),;
- 'SCREEN ',UPPER(topwind))+;
- IIF(readwind, '*is*','*is NOT*')+;
- ' involved in current READ'
- REPLACE listing WITH errdata ADDITIVE
-
- errdata = CHR(13)+'read level='+ALLTRIM(STR(readno))
- errdata = errdata+CHR(13)+ 'rec. no.='+ALLTRIM(STR(err_rec))
- errdata = errdata+CHR(13)+ '┤┼┼╠┐╒╝Σ ='+ALLTRIM(STR(DISKSPACE(),25))
- errdata = errdata+CHR(13)+ '▓┘╫≈╧╡═│ ='+OS()
- errdata = errdata+CHR(13)+ '░µ▒╛ ='+VERSION(1)
- REPLACE listing WITH errdata ADDITIVE
-
- errdata = CHR(13)+ ALLTRIM(STR(VAL(SYS(1016))/1024))+;
- "K memory in use by user objects"
- errdata = errdata+CHR(13)+ ALLTRIM(STR(VAL(SYS(12))/1024))+;
- "K memory remaining"
- errdata = errdata+CHR(13)+ ALLTRIM(STR(VAL(SYS(1001))/1024))+;
- "K total memory available to Fox"
- errdata = errdata+CHR(13)+ IIF(EMPTY(errpset),"NO",errpset)+;
- " Printer Driver Installed"
- REPLACE listing WITH errdata ADDITIVE
-
- errdata = CHR(13)+ 'processor='+ SYS(17)
- errdata = errdata+CHR(13)+ 'video card/monitor='+SYS(2006)
- errdata = errdata+CHR(13)+ 'FILES='+SYS(2010)
- errdata = errdata+CHR(13)+CHR(13)+REPLICATE('=',50)
- errdata = errdata+CHR(13)+' Status listing'
- errdata = errdata+CHR(13)+REPLICATE('=',50)+CHR(13)
- REPLACE listing WITH errdata ADDITIVE
-
- RELEASE errdata
-
- IF TYPE("gramdisk") # "C"
- gramdisk = ""
- ENDIF
- errfile = gramdisk+SYS(3)+".tmp"
- DO WHILE FILE(errfile)
- errfile = gramdisk+SYS(3)+".tmp"
- ENDDO
-
- LIST STATUS TO (errfile) NOCONSOLE
- APPEND MEMO listing FROM (errfile)
-
- ERASE (errfile)
-
- REPLACE listing WITH CHR(13)+REPLICATE('=',50)+CHR(13)+;
- ' Memory listing'+CHR(13)+;
- REPLICATE('=',50)+CHR(13) ;
- ADDITIVE
-
- LIST MEMORY TO (errfile) NOCONSOLE
- APPEND MEMO listing FROM (errfile)
- *APPEND MEMO usernotes FROM survey.txt
- SELECT (err_sel)
- ERASE (errfile)
- WAIT CLEAR
- SET COLOR OF SCHEME 5 TO
- SET TALK &errtalk
- SET PDSETUP TO errpset
- SET SAFETY &errsafe
- RETURN TO MASTER