Trapping Error Messages when using the Recompile_Proc Subroutine (OpenInsight 32-Bit)
At 24 JUL 2003 01:15:01PM David E Schranz wrote:
I am using the 'Recompile_Proc' Subroutine and am trapping the Error Status.
In case of compilation errors , I can trap the Line Number and Error Codes such as B103 AND SYS1215.
How do I go about finding the actual error message within the Subroutine.
Similar to the mesasge given when compiling a subroutine.
TIA
David Schranz
At 24 JUL 2003 01:41PM Mike Ruane wrote:
David-
Given that you are doing this on a licensed development copy of OpenInsight:
x=REPOSITORY('COMPILE', repos_key, '0') Stat=x err_list=' if stat=0 then display_info=\cf1 ' display_info=Body:@fm display_info=Errors during Compilation':@fm display_info=Line No Error':@fm err=Get_Status(errors) num_errors=count(errors, @fm) + (errors # '') for i=1 to num_errors this_error=errors[i] line=this_error line_text=this_error err_code =this_error errParms =delete(this_error, 1, 1, 0) gosub get_err_desc err_line=' if i=num_errors then err_line=@fm:ErrDesc end else err_line=fmt(line, 'R(0)#6'): space(3): ErrDesc end display_info=err_line err_list =err_line next i end *---------------------------------------------- * Get_Err_Desc *---------------------------------------------- Get_Err_Desc: OSREAD Reverrors FROM 'REVERROR.DAT' THEN Pos=INDEX(Reverrors,Err_Code,1) IF Pos THEN ErrDesc=ReverrorsPos, Char(13) Num_Parms=count(ErrParms, @vm) + (ErrParms # '') For errcount=1 TO Num_Parms Swap '%':errcount:'%' WITH ErrParms IN ErrDesc Next errcount END ELSE ErrDesc=Unknown Error Number: ':MsgID END END ELSE ErrDesc=Can't open error message table REVERROR.DAT." END returnHope it helps-
Mike