/* GetErr.xdme Get the error of the SNMA assembly and goto to the line where error is and display error descriptor in title bar Template: GetErr [ErrNum] If there is no ErrNum then the Next error is fetched */ arg num /* fetch error number. If omitted, it is '' */ /* make sure we have SNMA port */ xdme_add = address() snma_port = SNMA do while ~ show('p',snma_port) "title (Cannot find port named" snma_port exit 20 end /* do the actual job */ address SNMA INFO A if A.ERRORS = 0 then do address value xdme_add "title (SNMA: No Errors)" end else do "GETERR STEM E" num address value xdme_add options results 'rxresult $fname' /* fetch filename , make it BIGGGGG!*/ res=upper(result) if E.FILENAME = res then do /* error is in this file */ "title ("E.ERRNUM"/"A.ERRORS ":"E.ERRTXT", line:" E.LINENUM if E.LINENUM ~= 0 then do "goto" E.LINENUM "col" E.COLUMN end end else do if E.FILENAME='user macro' then do "title ("E.ERRNUM"/"A.ERRORS ":"E.ERRTXT", line:" E.LINENUM " in user macro" end else do /* error is in the other file (include file) */ "title ("E.ERRNUM"/"A.ERRORS "in file" E.FILENAME "line" E.LINENUM "," E.ERRTXT end end end