You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2001/05/06 01:11:51 UTC
cvs commit: xml-xerces/perl/t DOMParser.t
jasons 01/05/05 16:11:51
Modified: perl/t DOMParser.t
Log:
* t/DOMParser.t (Repository):
uses new ErrorHandler interface
Revision Changes Path
1.4 +10 -2 xml-xerces/perl/t/DOMParser.t
Index: DOMParser.t
===================================================================
RCS file: /home/cvs/xml-xerces/perl/t/DOMParser.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DOMParser.t 2001/04/13 22:25:45 1.3
+++ DOMParser.t 2001/05/05 23:11:51 1.4
@@ -42,15 +42,23 @@
print OUT <<'EOT';
use Carp;
+use blib;
use XML::Xerces;
use Cwd;
use lib 't';
use TestUtils qw($DOM);
+package MyErrorHandler;
+use strict;
+use vars qw(@ISA);
+@ISA = qw(XML::Xerces::PerlErrorHandler);
+
+sub fatal_error {sub exit(0);}
+
+package main;
{
- my $ERROR_HANDLER = XML::Xerces::perlErrorHandler->new();
- $ERROR_HANDLER->setFatalErrorFunction(sub {exit(0);});
+ my $ERROR_HANDLER = MyErrorHandler->new();
$DOM->setErrorHandler($ERROR_HANDLER);
}
# a bogus URL to cause a fatal error
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org