<p>Is there some way to catch exceptions which are otherwise unhandled (including those thrown outside the catch block)?</p>

<p>I'm not really concerned about all the normal cleanup stuff done with exceptions, just that I can catch it, write it to log/notify the user and exit the program, since the exceptions in these casese are generaly fatal, unrecoverable errors.</p>

<p>something like:</p>

<pre><code>global_catch()
{
    MessageBox(NULL,L"Fatal Error", L"A fatal error has occured. Sorry for any inconvience", MB_ICONERROR);
    exit(-1);
}
global_catch(Exception *except)
{
    MessageBox(NULL,L"Fatal Error", except-&gt;ToString(), MB_ICONERROR);
    exit(-1);
}
</code></pre>

This can be used to catch unexpected exceptions.
```
```
catch (...)
{
    std::cout << "OMG! an unexpected exception has been caught" << std::endl;
}
```
```
Without a try catch block, I don't think you can catch exceptions, so structure your program so the exception thowing code is under the control of a try/catch.