[613] | 1 | %ZTER1 ;ISC-SF.SEA/JLI - ERROR TRAP TO LOG ERRORS (VAX LOCAL SYMBOL TABLE) ;11/23/2005
|
---|
| 2 | ;;8.0;KERNEL;**18,24,36,49,112,162,275,392**;JUL 10, 1995;Build 5
|
---|
| 3 | VXD ;Record VAX DSM variables
|
---|
| 4 | S @%ZTERRT@("J")=$J_"^"_$ZC(%GETJPI,0,"PRCNAM")_"^"_$ZC(%GETJPI,0,"USERNAME")_"^"_%ZTER11I_"^"_$ZC(%SYSFAO,"!XL",$J),@%ZTERRT@("I")=$IO_"^"_$ZA_"^"_$ZB_"^"_$ZIO K %ZTER11I
|
---|
| 5 | S @%ZTERRT@("ZH")=$TR($ZH,",","^")
|
---|
| 6 | S %ZTER111="%" F D S %ZTER111=$ZSORT(@%ZTER111) Q:%ZTER111="" ;Code from DEC
|
---|
| 7 | . Q:$E(%ZTER111,1,5)="%ZTER"
|
---|
| 8 | . I $D(@%ZTER111)#2 D VNXT2
|
---|
| 9 | . I $D(@%ZTER111)>9 D VNXT3
|
---|
| 10 | . Q
|
---|
| 11 | Q
|
---|
| 12 | ;
|
---|
| 13 | VNXT2 S %ZTERCNT=%ZTERCNT+1,@%ZTERRT@("ZV",%ZTERCNT,0)=%ZTER111,^("D")=$E(@%ZTER111,1,255)
|
---|
| 14 | Q
|
---|
| 15 | VNXT3 S %ZTER11Q=%ZTER111
|
---|
| 16 | F S %ZTER11Q=$Q(@%ZTER11Q) Q:%ZTER11Q="" S %ZTERCNT=%ZTERCNT+1,@%ZTERRT@("ZV",%ZTERCNT,0)=%ZTER11Q,^("D")=$E(@%ZTER11Q,1,255)
|
---|
| 17 | Q
|
---|
| 18 | ;
|
---|
| 19 | STACK ;Record the new $STACK variable
|
---|
| 20 | I $ECODE]"" S $ZE=""
|
---|
| 21 | N %ZTER35 S %ZTER35=$S($D(^TMP("$ZE",$J,2)):^(2),1:$ETRAP)
|
---|
| 22 | D SAVE("$DEVICE",$DEVICE)
|
---|
| 23 | D SAVE("$ECODE",$E($ECODE,1,255))
|
---|
| 24 | D SAVE("$ESTACK",$ESTACK)
|
---|
| 25 | D SAVE("$ETRAP",%ZTER35)
|
---|
| 26 | D SAVE("$QUIT",$QUIT)
|
---|
| 27 | D SAVE("$STACK",$STACK)
|
---|
| 28 | N %,%1,%2 S %2=$ST
|
---|
| 29 | F %=0:1:$ST S %1=$E(1000+%,2,4) Q:$ST(%,"PLACE")["^%ZTER" D
|
---|
| 30 | . D SAVE("$STACK("_%1_")",$STACK(%))
|
---|
| 31 | . D SAVE("$STACK("_%1_",""ECODE"")",$STACK(%,"ECODE"))
|
---|
| 32 | . D SAVE("$STACK("_%1_",""PLACE"")",$STACK(%,"PLACE"))
|
---|
| 33 | . D SAVE("$STACK("_%1_",""MCODE"")",$STACK(%,"MCODE"))
|
---|
| 34 | . S:$STACK(%,"ECODE")]"" %2=%
|
---|
| 35 | S @%ZTERRT@("LINE")=$STACK(%2,"MCODE")
|
---|
| 36 | S $ECODE=""
|
---|
| 37 | Q
|
---|
| 38 | ;
|
---|
| 39 | SAVE(%n,%v) ;Save name and value into global, use special variables
|
---|
| 40 | S %ZTERCNT=%ZTERCNT+1,@%ZTERRT@("ZV",%ZTERCNT,0)=%n
|
---|
| 41 | S @%ZTERRT@("ZV",%ZTERCNT,"D")=%v
|
---|
| 42 | Q
|
---|
| 43 | ;
|
---|
| 44 | VERR ;
|
---|
| 45 | S @%ZTERRT@("ZE2")="%DSM-E-ET, Error occurred in %ZTER, "_$ECODE
|
---|
| 46 | HALT
|
---|