>>Maybe you can check program calling stack?
>
>That's what I'm doing now, but it means checking for a specific Program-Name, and I don't like that. If he changes which program has the "Read Events" in it, the Error-Handler quits working right.
>I'm going to change it so that it checks Prog(1) to see if it's an Object or not. I think I can safely assume that prog(1) WILL NOT be an object if there is a "Read Events" in effectl. If prog(1) is an object then the Error-Handler will "CANCEL", if not "RETURN TO MASTER".
>
>Can you think of a way that prog(1) WILL BE an object with "Read Events" in it? The only way I can think of is :
>
>MAIN.PRG
> Public oApp
> oApp = CreateObject('cusApp')
> _Shell = 'oApp.Read_Events()'
>
> Define cusApp as Custom
> Procedure Read_Events
> Read Events
> End Proc
> End Define
>
>and I can't imagine anyone setting up an app like that.
>
If somebody would come up with code like that he/she could write there own error handler. <s>
--sb--