Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!decvax!bellcore!ulysses!ucbvax!info-vax From: info-vax@ucbvax.UUCP Newsgroups: mod.computers.vax Subject: Re: Getting tracebacks without signalling Message-ID: <8602071038.AA10846@seismo.CSS.GOV> Date: Fri, 7-Feb-86 17:30:41 EST Article-I.D.: seismo.8602071038.AA10846 Posted: Fri Feb 7 17:30:41 1986 Date-Received: Sun, 9-Feb-86 07:41:21 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 58 Approved: info-vax@sri-kl.arpa [] The following condition handler and message definition file should allow you both to see a traceback and to do an unwind. VMS V4 kindly displays the original error message when it comes to HANDLE in the traceback. With previous versions of VMS, it was necessary to call SYS$PUTMSG to see the cause of the original error. INTEGER*4 FUNCTION HANDLE( SIGARGS, MECHARGS ) IMPLICIT INTEGER(A-Z) INTEGER*4 SIGARGS(2), MECHARGS(5) INCLUDE '($SSDEF)' INCLUDE '($STSDEF)' EXTERNAL FAC_TRABACFOL IF ( ( SIGARGS(2) .AND. STS$M_SEVERITY ) .LT. 4 ) THEN C For all except severe errors, use default handler to print traceback C and continue HANDLE = SS$_RESIGNAL ELSE C Severe error ... C We signal a warning to get a traceback (from here). CALL LIB$SIGNAL( FAC_TRABACFOL ) C Now unwind to the caller of the establisher of this handler CALL SYS$UNWIND( , ) ENDIF RETURN END ***** .TITLE FACMSG.MSG Message definition .FACILITY FACIL 101 /PREFIX=FAC_ ! ^^^^^ ^^^ ^^^ Replace as appropriate TRABACFOL/W "error has occurred - traceback follows" .END -- Jim Richardson Department of Pure Mathematics, University of Sydney, NSW 2006, Australia UUCP: ...!seismo!munnari!summer.oz!jimr ARPA: jimr%summer.oz@seismo.arpa CSNET: jimr@summer.oz