Error handler just goes away! Why?
Michael Mantkowski
michaelj at clientrax.com
Thu Mar 19 11:17:38 EDT 2015
Hi Doug,
I don't think this is the case. We use "clear method stack" in our
application and it does blow away the error handler.
I even use "clear method stack" within the error handler at one point to
stop execution of print commands if the printers are not properly setup.
I do follow it up like this.
Clear method stack
SEA continue execution
This is in O$4x however. Maybe it has changed in later version?
*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************
-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Doug
Easterbrook
Sent: Thursday, March 19, 2015 10:57 AM
To: OmnisDev List - English
Subject: Re: Error handler just goes away! Why?
I suspect it goes away because you clear the method stack. I've seen that.
what we do at the end of the error handler is the following two commands.
I recall having to do that eons ago to keep the handler alive and I don't
recall where I read it.
Calculate #F as 0
SEA continue execution
so. you could, if its an error on the polling window...... set a flag in
your error routine that tells it to stop and start itself.
I have also found that if you have a breakpoint in the error handler, and go
up in the debugger to he method that called the error handler and continue
execution from there, your error handler will not get called again. Kind
of like what you say.
the only way I've found for it to keep on going it to make sure it ends
nicely with the above two commands.
eg errorhanlder
do my stuff and set flags
Calculate #F as 0
SEA continue execution
and the error handler will work for the next error condition. if you don't
finish the method, it will not get called again until you restart omnis.
It might work if you clear the error handlers and reset them.. but I can't
vouch for that.
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 536-1205 Fax (403) 536-1210
> On Mar 19, 2015, at 8:35 AM, David Barnett <david at fairlibertyscall.com>
wrote:
>
> In this case, I'm working in Studio 5.1.1.
>
> Situation: there's a 'polling' window with a timer running to check a
table periodically for event records to process. That's all fine. But at
some locations an export triggered by one of those events hits a disk error
now and then, which raises a specific Omnis error. That gets trapped in an
error handler so we can log the error.
>
> In the error handler I call 'clear method stack', close the polling
window, write out some additional error log records, and re-open the polling
window. That re-establishes the polling action just fine. But at that point
the error handle is gone, lost at sea, absolutely nowhere to be found. I
can't even reestablish it with a new set error handler call. I have to close
Omnis and restart the app. The error handler gets set at startup and works
fine.
>
> So, why does it just go away for no apparent reason? And why can't I reset
it? Any ideas?
>
> David
>
> David Barnett David at FairLibertysCall.com
> C: 516-398-8668 www.FairLibertysCall.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list