나는 이것 때문에 머리를 크게 부딪 혔습니다. $ etrap (오류 처리 특수 변수) 방식이 생각 나게되면 모든 오류를 정말로 잡아 두어야합니다. 나는 이것을 성공적으로 해왔다. 하지만 사용자 모드 (응용 프로그램 모드)에서 실행될 때 내부 캐시 라이브러리 오류로 인해 여전히 응용 프로그램이 중지되기 때문에 나는 여전히 뭔가를 놓치고 있습니다. 내가 무슨 짓을
했다 :
이 모든 후ProcessX(var)
set sc=$$ProcessXProtected(var)
w !,"after routine call"
quit sc
ProcessXProtected(var)
new $etrap
;This stops Cache from processing the error before this context. Code
; will resume at the line [w !,"after routine call"] above
set $etrap="set $ECODE = """" quit:$quit 0 quit"
set sc=1
set sc=$$ProcessHelper(var)
quit sc
ProcessHelper(var)
new $etrap
; this code tells Cache to keep unwindind error handling context up
; to the previous error handling.
set $etrap="quit:$quit 0 quit"
do AnyStuff^Anyplace(var)
quit 1
AnyStuffFoo(var)
; Call anything, which might in turn call many sub routines
; The important point is that we don't know how many contexts
; will be created from now on. So we must trap all errors, in any
; case.
;Call internal Cache library
quit
, 내가 프롬프트에서 프로그램을 호출 할 때 작동하는지 볼 수 있습니다! 하지만 캐시 터미널 스크립트 (응용 프로그램 모드, 내가 말한)에서 호출하면 프로그램이 중단되고 오류 트래핑 메커니즘이 예상대로 작동하지 않습니다.
표시 등이 있습니까? 사전에
감사합니다,
루이스 페르난도