I have debug logging in my app
Some users debug logs are getting an error from this piece of code, which is the entire code in the App’s FileQuit menu handler.
[quote]if keyboard.AsyncAltKey then
//do something
end if
RequestedQuit = true
quit
exception
writelog “error in filequit”[/quote]
Given that the ALT key is not being held at the point when the File/Quit menu item is used, and RequestedQuit is a simple boolean App-level variable,
how can this code fall into the exception and produce a log entry of “error in filequit” ?
Its one IF on the keyboard object and one assignment to a boolean.
No, you don’t have to re-raise QuitException. Normally, you don’t see either QuitException or ThreadEndException.
If your unhandled exception handler you should have
if theError isA EndException or theError isA ThreadEndException then
'nothing to do
Raise theError
Both open and quit of an app are a bit special. For open some things may not yet be there. For quit something may not be available anymore. Is it possible that the check for keyboard.AsyncAltKey isn’t a good idea for quitting?