How to catch an exception from a private member subclass object?
<p>Given the pseudo-code below, I want to catch the exception thrown by the sub-object a in class B, maintaining this object private in B. The catch clause as stated below doesn't work because the object a is private in B. How can I catch this exception ?</p>

<p><strong>Edit</strong>  I have changed the pseudo-code to embed class A within class B.</p>

<pre><code>class B
{
    class A
    {
        public:
        class Exception{};
        A() throw(Exception) { ... }  // A ctor throws an Exception class object
    } a;
    public:
    B() { ... }     //  B ctor
};

int main()
{
    try
    {
        B b;
    }
    catch( B::A::Exception&amp; )
    {
        ...
    }

}
</code></pre>
