Original Post
Right now my application works like this.
The only way to shutdown the application is by throwing a Shutdown() or an Error(). The Error class is derived from the Shutdown class which allows me to only catch a Shutdown.
Lets say the application starts the shutdown process in the catch part, and an Error occurs? What I am supposed to do with that throw, use another try-catch inside the other catch? And then if an error occurs in that catch what about then?
Basically what I want is that the application does a normal good shutdown in case of an error. But the problem is if another error occurs when the error has been caught and the shutdown process has started.