From 47bdf5a7b53ee872cb30a23a493577894eac8bc9 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 17 Apr 2009 19:04:55 +0000 Subject: [PATCH] exportSession must be closed _before_ it throws. --- lib/WebGUI/AssetAspect/RssFeed.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebGUI/AssetAspect/RssFeed.pm b/lib/WebGUI/AssetAspect/RssFeed.pm index 780aeb044..badc52165 100644 --- a/lib/WebGUI/AssetAspect/RssFeed.pm +++ b/lib/WebGUI/AssetAspect/RssFeed.pm @@ -224,8 +224,8 @@ sub exportAssetCollateral { # next, get the contents, open the file, and write the contents to the file. my $fh = eval { $dest->open('>:utf8') }; if($@) { - WebGUI::Error->throw(error => "can't open " . $dest->absolute->stringify . " for writing: $!"); $exportSession->close; + WebGUI::Error->throw(error => "can't open " . $dest->absolute->stringify . " for writing: $!"); } $exportSession->asset($selfdupe); $exportSession->output->setHandle($fh);