Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 11 JAN 1998 02:09:01AM Ken Wachs wrote:

Dear ViP gurus:

I am trying to create a 'generic' error handling subroutine which would respond to any error occurring at runtime. The intention is to reduce code duplication and to consolidate the management of error processing.

I am having a problem doing this, as the Resume statement does not seem to keep track of the current (most recent) error once the public module is entered. The Err(), Erl() and Error() all seem to 'know' that an error occurred, but the Resume statement does not bring execution back to the line after the offending code.

Is there a way around this? Any help would be appreciated.

Regards,

Ken Wachs


At 12 JAN 1998 01:02PM John Averell Revelation wrote:

Have you tried this.

1) In each script, put

On Error Goto Proc

In the same script, put

Proc:

erproc Err, Error$

Resume Next

2) In Public, put

Option Public

Sub erproc(Enumber%, Emsg$)

End Sub

This worked for me OK with a single AppWindow. Don't know about cross-appwindow.


At 14 JAN 1998 05:17PM Ken Wachs wrote:

John:

The error trapping procedure you gave me seems to work perfectly, even across windows.

Thanks again!

Ken Wachs

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/fead1d3a9115b16d852565890027473f.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1