Liquid XML Data Binder 2021
Liquid XML Data Binder (C++, Java, VB6) / Reference / C++ / Reference / C++ LtXmlLib19::CLtException
In This Topic
    C++ LtXmlLib19::CLtException
    In This Topic
    LtXmlLib19::CLtException Class
    The base class for all exceptions

    Base Classes:
    Implemented interfaces:
      Members Description  
        CLtException Constructor for CLtException  
        GetFullMessage Gets the full message (including messages from nested/inner exceptions)  
        GetInnerException Gets the inner exception (may be NULL)  
        GetMessage Gets the message from this exception (ignores data in inner exceptions).  
        operator= Makes a copy of the exception  

    Example

    Note:
    The exception must be caught by reference.
    There is oftern an inner exception within the CLtException, so check or use GetFullMessage to get the text for nested excetpion.

    try
    {
        // create an instance of the class to load the XML file into
        ElmSequence::CElmSequencePtr spElm = ElmSequence::CElmSequence::CreateInstance();
        ElmSequence::CBasicElementPtr spBasElm = ElmSequence::CBasicElement::CreateInstance();

        ...
    }
    catch (CLtException& e)
    {
        // Note : exceptions are likely to contain inner exceptions
        // that provide further detail about the error, GetFullMessage
        // concatantes the messages from them all.
        _tprintf(_T("Error - %s\n"), e.GetFullMessage().c_str());
    }