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

List:       xalan-c-users
Subject:    RE: Getting the line and column number of an error
From:       David N Bertoni/Cambridge/IBM <david_n_bertoni () us ! ibm ! com>
Date:       2003-01-22 16:25:02
[Download RAW message or body]





Hi Don,

There's no nightly build, but if you get the latest code from CVS and build
it yourself, you should see these coming through.  Unfortunately, due to
our convoluted error handling mechanism, they are coming through as
warnings, and not errors.  )Yet another reason why it needs to be
overhauled.)

Dave



                                                                                      \
                
                      "Don McClimans"                                                 \
                
                      <dmcclimans@IntiElect         To:      \
                <xalan-c-users@xml.apache.org>                              
                      ronics.com>                   cc:      (bcc: David N \
                Bertoni/Cambridge/IBM)                        
                                                    Subject: RE: Getting the line and \
                column number of an error          
                      01/21/2003 12:45 PM                                             \
                
                                                                                      \




Dave,

I'm back with more questions about error handling...

I accidentally generated a source file with a 0x04 character in the text of
an element (UTF-8 encoding). Xalan (correctly) does not like this. When I
run the command line xalan.exe, I get the message:
             Fatal Error at (file test.txt, line 15729, column 24): Invalid
character
 Unicode: 0x4)
             Invalid character (Unicode: 0x4)

In my application, my custom problemListener is never called, and
XalanTransformer::getLastError() returns:
             Invalid character (Unicode: 0x4)

So I'm back to wondering how to get the line number of the error.

I tried creating a std::ostringstream, and calling
XalanTransformer::setWarningStream with it. Unfortunately, no message is
stored in the ostringstream. Browsing the xalan code, this has me confused,
as it looks like that's where the first message ("Fatal error...") above is
coming from in the xalan.exe example. Should this work?

I'm now running the 2002/10/21 interim release. Should I upgrade to the
latest nightly build to (presumably) get your fix to return the line number
in getLastError()? How stable is this? I need something that I can release
to others.

Or is there another way to get at that information?

Thanks for any help you can give me.

Don


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

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