From a84820861904124f7aa6898c14f53cd4f1885748 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 12 Dec 2007 08:49:58 +0000 Subject: [PATCH] Emit bad XML fragment if appendWellBalancedChunk() fails. This is happening on the Wednesday morning run. --- lib/ZOOM/IRSpy/Record.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM/IRSpy/Record.pm b/lib/ZOOM/IRSpy/Record.pm index 3a5c5f5..7444d70 100644 --- a/lib/ZOOM/IRSpy/Record.pm +++ b/lib/ZOOM/IRSpy/Record.pm @@ -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; } -- 1.7.10.4