How to chain exceptions?
You can re-throw an exception:

int main() {
    ...   
    try {
        ...
        try
        {
            foo();
        }
        catch(std::exception const&amp; e) {
            std::cout &lt;&lt; "Fatal error: " &lt;&lt; e.what() &lt;&lt; std::endl;

            throw; // re-throw the exception.
                   // or you could throw a different exception.
        }
        ...   
    } catch (const std::exception &amp;e) {
        std::cout &lt;&lt; "Fatal error: " &lt;&lt; e.what() &lt;&lt; std::endl;
        return;   
    }
    ... 
}