Emit bad XML fragment if appendWellBalancedChunk() fails.
authorMike Taylor <mike@indexdata.com>
Wed, 12 Dec 2007 08:49:58 +0000 (08:49 +0000)
committerMike Taylor <mike@indexdata.com>
Wed, 12 Dec 2007 08:49:58 +0000 (08:49 +0000)
This is happening on the Wednesday morning run.

lib/ZOOM/IRSpy/Record.pm

index 3a5c5f5..7444d70 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Record.pm,v 1.27 2007-08-02 11:28:38 mike Exp $
+# $Id: Record.pm,v 1.28 2007-12-12 08:49:58 mike Exp $
 
 package ZOOM::IRSpy::Record;
 ### I don't think there's any reason for this to be separate from
@@ -147,7 +147,12 @@ sub _half_decent_appendWellBalancedChunk {
 
     if (1) {
        $frag =~ s,>, xmlns:irspy="$ZOOM::IRSpy::Utils::IRSPY_NS">,;
-       $node->appendWellBalancedChunk($frag);
+       eval {
+           $node->appendWellBalancedChunk($frag);
+       }; if ($@) {
+           print STDERR "died while trying to appendWellBalancedChunk(), probably due to bad XML:\n$frag";
+           die $@;
+       }
        return;
     }