Re: Building XML-Xerces-2.3.0-3 on Windows

[email protected] (Jason E. Stewart)
Newsgroups gmane.text.xml.xerces-p.devel
Message-ID <[email protected]>
Hi Martin,

I found this draft message lying in my editor - don't know if I ever
sent it off. If not, sorry.

jas.

Martin Raspe <[email protected]> writes:

> If I put a "print $@" after each eval and run the test separately then
> it passes ok ...
> 
> D:\Src\XML-Xerces-2.3.0-3> perl t/schema.t
> 
> 1..3
> ok 1 - module loaded
> ok 2
> ok 3
> FATAL ERROR:
> FILE:    FAKE_SYSTEM_ID
> LINE:    41
> COLUMN:  6
> MESSAGE: Expected end of tag 'personnel'
>   at t/schema.t line 50

This is correct, why should adding the print suddenly make the test
run correctly, though?

> Handling Unknown exception, <IN> chunk 1.
> # Looks like your test died just after 3.
> 
> (I'm not sure if the last two lines are correct.)

Yes, this seems to happen if exceptions get thrown, the perl test
harness gets unhappy sometimes.

> >>It seems the error code somehow gets lost or overwritten when the
> >>$error object is referenced again. If you reverse the arguments in the
> >>"ok" clause as follows it passes the test:
> >>
> >>ok($error->getCode() == $XML::Xerces::XMLExcepts::URL_NoProtocolPresent
> >>&&
> >>UNIVERSAL::isa($error,'XML::Xerces::XMLException')
> >>&&
> >>$error);
> 
> > That will be a big problem for handling exceptions - the above code
> > will die if the error isn't an exception object...
> 
> Yes, I just wanted to show that the code is returned correctly if
> called first. 

Understood. 

> May be the reason is that the exception handling code itself raises
> an exception.

Yes, it does seem to be happening.

jas.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.