Hi, yes I have set up some kind of global mechanism for AS2.
You can find it here http://www.objectpainters.com/downloads/globalerrorhandler.zip I will post information about it soon, look here for some basic info http://objectpainters.com/blog/?p=32 Basically, its a simple RuntimeException that extends Error, so you still can do 'throw new RuntimeException (...)' You can subclass that as well for your own error types, an example is included for Assert and AssertionFailedException. What this class does is, you throw it, and you have to catch it and consume it (check the included example). If you do not consume the error, a default error handler (your global error handler) will be called. So even if you throw an error from an asynchronous call (eg the parse method of an xml callback) it will still be shown if you dont handle it. HTH, JC On 7/14/07, dcamp <[EMAIL PROTECTED]> wrote:
I was trying to figure out if there is a way to set up a global error handler. This would catch all errors that will occur in a program. I have tried putting the entry point in a try...catch block and also add listeners to the stage, but I am not able to handle reference errors. If anyone has attempted this or has an insight please let me know. _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

