How to terminate a Flash application upon unforeseen errors?

How to terminate a Flash application upon unforeseen errors?

Dear all,
I am writing up an app that must not be allowed to shut down the users system under any circumstances, thus I need to learn how I can terminate my app.
What tools are there to do this?
So, Is there a basic way to have a “global error sniff” that somehow determines that the app needs to be terminated – and thus prevents affecting other processes that are running?

PLS advice
Jaxz