>>Hi,
>>
>>After examining the run-time error log (mainly for one customer), I see one case where the error was created in an INIT method of some main form (I see Stack Level 5 indicating this error my_form.init). Then the error (Stack Level 6) goes to the function dl_ErrorMessage (a function in one of my prg). The function dl_ErrorMessage() has the code:
>>
>>oErrorForm = NEWOBJECT( "dl_error_message", "dl_error.vcx",'', tcTxtMessage,
>>tcTxtCaption, cParameter1, cParameter2, cParameter3 )
>>oErrorForm.show()
>>
>>
>>And here the actual error happens:
>>
>>Error reading file FQDN UNC Style\appfolder\libs\dl_error.vcx
>>
>>
>>Oddly enough the error log is written to the APPFOLDER. So, the desktop is not completely disconnected from the Share.
>>
>>So, basically, if I understand correctly the application cannot file dl_error.vcx, which is INSIDE the EXE program.
>>
>>Two questions:
>>1. How can I trap the error (or find out what exactly caused the error in the INIT method)? Should the entire INIT method to be within TRY/CATCH? Note, that even if I do that, the INIT initializes a bunch of BIZ objects that are dropped on the form. So, I am not sure where the error is generated, in the INIT code or in the code that instantiate all BIZ objects.
>>2. Could the error 1 (above) be a precursor that the desktop lost connection to the network? And hence even the dl_error.vcx cannot be found?
>>
>>TIA
>>
>>UPDATE: Probably main question. What code should check if the Application EXE is still available and that the library DL_ERROR.VCX in this EXE can be read? That is, what code should be executed before:
>>
>>oErrorForm = NEWOBJECT( "dl_error_message", "dl_error.vcx",...)
>>
>
>It looks like you're instantiating an error handler/form when an error occurs. One thing you could do instead is instantiate it when your app starts and have it globally available - if it's a form, maybe hidden (?) That way it will be guaranteed to be available if an error occurs.
Interesting approach. I have never done it; but it makes sense. I will need to carefully test it first.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham