[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xalan-c-users
Subject:    Re: Getting error information from exceptions
From:       david_n_bertoni () us ! ibm ! com
Date:       2003-07-31 19:05:24
[Download RAW message or body]





Hi Dave,

This shouldn't happen -- there should always be some sort of information in
the error message, and your catch block should never be entered.  A couple
of things to try:

   1. Run your input document and stylesheet through the command line and
   see what happens.
   2. If you can come up with a minimal document and stylesheet which
   reproduces the problem, create a Bugzilla report and attach the
   documents.

Also, your compiler and platform information would be helpful.

Dave



                                                                                      \
                
                      "David Fishburn"                                                \
                
                      <fishburn@ianywh         To:      \
                <xalan-c-users@xml.apache.org>                                        \
                
                      ere.com>                 cc:      (bcc: David N \
                Bertoni/Cambridge/IBM)                                      
                                               Subject: Getting error information \
                from exceptions                                 
                      07/31/2003 11:58                                                \
                
                      AM                                                              \
                
                                                                                      \





Xalan 1.5, Xerces 2.2.0

Coming from the samples, I have code like:
            try
            {
                // Create an instance of the class we wrote to handle
                // the callbacks...
                CallbackHandler                        theHandler(api,
arg_handle,
&retval);

                // Do the transform...
                ret = theXalanTransformer.transform(
                        //xml_str.c_str(),
                        theXMLStream,
                        inputSource,
                        &theHandler,
                        writeCallback,
                        flushCallback);

                if(ret != 0)
                {
                    cerr << "Error: " <<
theXalanTransformer.getLastError() << endl;
                }
            }
            catch(...)
            {
                    cerr << "Error: " <<
theXalanTransformer.getLastError() << endl;
            }


In the catch block, theXalanTransformer.getLastError() has nothing in
it.
Is there anyway (this could be a simple C++ question) to actually get
some *meaningful* message on what threw an exception.  You can do this
easily in Java, so there must be something similar in C++.

Thanks in advance.
Dave


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic