From: Mike Taylor Date: Wed, 12 Dec 2007 08:49:58 +0000 (+0000) Subject: Emit bad XML fragment if appendWellBalancedChunk() fails. X-Git-Tag: CPAN-v1.02~336 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=a84820861904124f7aa6898c14f53cd4f1885748 Emit bad XML fragment if appendWellBalancedChunk() fails. This is happening on the Wednesday morning run. --- 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; }