1 |
james |
32 |
REM > JLibraries:Debug.2 |
2 |
|
|
REM © James Bursa, 1997 |
3 |
|
|
|
4 |
|
|
REM JB 20 Nov 1997 created |
5 |
|
|
|
6 |
|
|
|
7 |
|
|
DEF PROCBUG(Text$) |
8 |
|
|
LOCAL PFlg%, File% |
9 |
|
|
|
10 |
|
|
IF FNWimp_FileExists("Debug") THEN |
11 |
|
|
File% = OPENUP("Debug") |
12 |
|
|
PTR#File% = EXT#File% |
13 |
|
|
BPUT#File%, Text$ |
14 |
|
|
CLOSE#File% |
15 |
|
|
ENDIF |
16 |
|
|
|
17 |
|
|
SYS"XOS_SWINumberFromString",, "DDEUtils_ThrowbackStart" TO ;PFlg% |
18 |
|
|
IF (PFlg% AND 1) THEN ENDPROC |
19 |
|
|
|
20 |
|
|
SYS"XDDEUtils_ThrowbackStart" |
21 |
|
|
SYS"XDDEUtils_ThrowbackSend", 0,, Task_Name$ |
22 |
|
|
SYS"XDDEUtils_ThrowbackSend", 2,, Task_Name$, 0, 0, Text$ |
23 |
|
|
SYS"XDDEUtils_ThrowbackEnd" |
24 |
|
|
|
25 |
|
|
ENDPROC |
26 |
|
|
|
27 |
|
|
REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜ |
28 |
|
|
|
29 |
|
|
DEF FNWimp_Error |
30 |
|
|
LOCAL Quit%, Text$, T%, T$, PFlg% |
31 |
|
|
LOCAL ERROR |
32 |
|
|
ON ERROR LOCAL ON ERROR OFF: ERROR 0, (REPORT$+" in Error Handler (Code "+STR$ERL+"); must exit.") |
33 |
|
|
|
34 |
|
|
SYS"Hourglass_Smash" |
35 |
|
|
|
36 |
|
|
IF Erro_ERR% = -1 THEN |
37 |
|
|
Erro_ERR% = ERR |
38 |
|
|
Erro_ERL% = ERL |
39 |
|
|
Erro_REPORT$ = REPORT$ |
40 |
|
|
ENDIF |
41 |
|
|
|
42 |
|
|
CASE Erro_ERR% OF |
43 |
|
|
|
44 |
|
|
WHEN Erro_Memo% |
45 |
|
|
Quit% = FNWimp_ReportError(Erro_Memo$, Erro_Warn%) |
46 |
|
|
|
47 |
|
|
WHEN Erro_Info%, Erro_Warn% |
48 |
|
|
IF LEFT$(Erro_REPORT$, 1) = "%" THEN |
49 |
|
|
Erro_REPORT$ = FNMess_Lookup(MID$(Erro_REPORT$, 2), File_Mess%) |
50 |
|
|
ENDIF |
51 |
|
|
Quit% = FNWimp_ReportError(Erro_REPORT$, Erro_ERR%) |
52 |
|
|
|
53 |
|
|
OTHERWISE |
54 |
|
|
IF Task_ThrowBack% THEN |
55 |
|
|
SYS"XOS_SWINumberFromString",, "DDEUtils_ThrowbackStart" TO ;PFlg% |
56 |
|
|
IF (PFlg% AND 1) = 0 THEN |
57 |
|
|
T$ = "<"+Task_Name$+"$RunImage>" |
58 |
|
|
T% = INSTR(Erro_REPORT$,"in """) |
59 |
|
|
IF T% THEN T$ = MID$(Erro_REPORT$, T% + 4, LENErro_REPORT$ - T% - 4) |
60 |
|
|
SYS"XDDEUtils_ThrowbackStart" |
61 |
|
|
SYS"XDDEUtils_ThrowbackSend", 0,, T$ |
62 |
|
|
SYS"XDDEUtils_ThrowbackSend", 1,, T$, Erro_ERL%, 1, Erro_REPORT$+" (Code &"+STR$~Erro_ERR%+")" |
63 |
|
|
SYS"XDDEUtils_ThrowbackEnd" |
64 |
|
|
ENDIF |
65 |
|
|
ENDIF |
66 |
|
|
@% = "+g20.20" |
67 |
|
|
SYS"WimpExt_SubstituteArgs", Erro_Erro$, B%, Erro_REPORT$, STR$Erro_ERL%, STR$~Erro_ERR%, 0, 0 TO ,Text$ |
68 |
|
|
Quit% = FNWimp_ReportError(Text$, 1) |
69 |
|
|
IF Quit% THEN Quit% = FNWimp_ReportError(Erro_Quit$, Erro_Ques%) |
70 |
|
|
|
71 |
|
|
ENDCASE |
72 |
|
|
|
73 |
|
|
Erro_ERR% = -1 |
74 |
|
|
|
75 |
|
|
=Quit% |