> I am having trouble using the enum associated with the DOMException.  I
> would certainly prefer to use the enum when error checking than the
numeric
> equivalent.  Here is a simplified example of my problem:
>
> try
>             {
>                   DOMEntityReference*     testRef =
> doc->createEntityReference(amp);
>             }
>             catch(DOMException e)
>             {
>
>                   if(e.code == DOMSTRING_SIZE_ERR)
>                         cout<<"Some particularly helpful message"<<endl;
>             }

Do you really mean to catch that exception by value?  Why not by const
reference?

             catch(const DOMException& e)
             {

                   if(e.code == DOMException::DOMSTRING_SIZE_ERR)
                         cout<<"Some particularly helpful message"<<endl;
             }

The enum is declared withing the DOMException class, so it is within that
scope.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to