1 SUB M11ERR & 2 !******************************************************************** & ! & ! M11ERR & ! & ! Standard Error Handler & ! & ! & !******************************************************************** & ! 3 ! Subprogram: M11ERR & ! Version: 01 & ! Programmer: Jean Fullerton & ! Releaser: & ! & ! 11 !-------------------------------------------------------------------- & ! & ! Copyright & ! & !--------------------------------------------------------------------- 100 ! & ! & ! Description & ! & ! M11ERR prints out at the CRT a set of error messages. & ! & !--------------------------------------------------------------------- 250 ! & ! & ! Interface & ! & ! Common areas: & ! & ! COMERR - Error condition variables & ! COMCON - General system constants & ! & ! Arguments: & ! & ! none & ! & ! & !--------------------------------------------------------------------- 300 ! & ! & ! & ! Channel Assignments & ! & ! & ! none & ! & !--------------------------------------------------------------------- 400 ! & ! & ! & ! Variables and Arrays Used & ! & ! & ! & ! AUX.MESSAGE$ System error description message & ! AUX.MESSAGE2$ Traceback message & ! ERL Line # where error occurred & ! ERR Set to error number after error & ! & ! 600 !******************************************************************** & ! & ! & ! C O M M O N D E C L A R A T I O N S & ! & ! & !******************************************************************** & 1000 !******************************************************************** & ! & ! & ! S T A R T S U B P R O G R A M L O G I C & ! & ! & !******************************************************************** & 1010 ON ERROR GOTO 29000 & ! Set up standard error trap. & 1020 PRINT HOME.UP$ + ERASE.EOS$ & ! Clear screen. & 1030 GO TO 32767 IF ERR.CODE% = 0% & OR ERR.CODE% = EXIT.M11% & OR ERR.CODE% = MAIN.MENU% & ! Bypass error handling if no errors. & 1050 GO TO 4000 IF ERR.CODE% > 100% & ! Bypass regular error handling if it is a Sort-11 problem. & 1100 AUX.MESSAGE$ = "System message: " & + EDIT$ (ERT$(ERR.ERR%), 136%) & + " (" + EDIT$ (STR$(ERR.ERR%),2%) + ")" & + " " + FN.DATE$(0%) & + " " + FN.TIME$(0%) & ! Set up system error message. & 1125 AUX.MESSAGE2$ = "Error occurred in program " + ERR.PROGNAM$ & \ AUX.MESSAGE2$ = AUX.MESSAGE2$ + " (" + ERR.SUBNAM$ + ")" & UNLESS (ERR.SUBNAM$ = " " & OR ERR.SUBNAM$ = ERR.PROGNAM$) & \ AUX.MESSAGE2$ = AUX.MESSAGE2$ + " at line " + STR$(ERR.ERL%) & UNLESS ERR.ERL% = 0% & ! Set up traceback message. & 2000 IF ERR.CODE% = FATAL.ERROR% & THEN PRINT & \ PRINT "A fatal error has occurred in the Smart Mailer." & \ PRINT & \ PRINT AUX.MESSAGE$ & \ PRINT AUX.MESSAGE2$ & \ PRINT ERR.MSG$ & \ PRINT & ! Print error messages to the screen. & ! Note: At this time M11ERR is only used for fatal errors. & ! This section of code would allow M11ERR to be used for non-fatal & ! errors and then return to the calling routine. & 2999 GO TO 32767 & & 4000 !-------------------------------------------------------------------- & ! & ! Sort-11 Errors & ! & !-------------------------------------------------------------------- & 4100 CHANGE ERR_SORT_ERRBUF$ TO E% ERR_WORD1% = E%(1%) + SWAP%(E%(2%)) ERR_WORD2% = E%(3%) + SWAP%(E%(4%)) ERR_WORD3% = E%(5%) + SWAP%(E%(6%)) ERR_WORD4% = E%(7%) + SWAP%(E%(8%)) ! The contents of the SORT error buffer was received as a string ! from SMSORT, so we have to "unpack" the data. See RSTS ! Programmer's Manual, Section 7.2.3. 4200 PRINT & \ PRINT "A fatal error has occurred in the Smart Mailer," & \ PRINT "within Sort-11." & \ PRINT & \ PRINT "SORT module - " + ERR.SUBNAM$ & \ PRINT "Contents of SORT error buffer:" & \ PRINT " First word = " & + FORMAT$(ERR_WORD1%, "######") & \ PRINT " Second word = " & + FORMAT$(ERR_WORD2%, "######") & \ PRINT " Third word = " & + FORMAT$(ERR_WORD3%, "######") & \ PRINT " Fourth word = " & + FORMAT$(ERR_WORD4%,"######") & \ PRINT & \ PRINT & \ PRINT & ! Print a description of the SORT error. & ! The sort error messages are discussed in appendix A of the & ! PDP-11 SORT/MERGE USER'S GUIDE. & & 9000 GO TO 32767 & ! EXIT. & 29000 !******************************************************************** & ! & ! & ! S T A N D A R D E R R O R H A N D L I N G & ! & ! & !******************************************************************** & 29100 RESUME 32767 & 32767 SUBEND