From 71533cbba7937eb87a6a65136a2d239155c8738a Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 15 Oct 2011 18:14:10 -0700 Subject: [PATCH] Make getPrototypeList catch exceptions. --- lib/WebGUI/Asset.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 7100cce0b..03f288cd8 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1604,8 +1604,8 @@ sub getPrototypeList { my $userUiLevel = $session->user->get('uiLevel'); my @assets; ID: foreach my $id (@prototypeIds) { - my $asset = WebGUI::Asset->newById($session, $id); - next ID unless defined $asset; + my $asset = eval { WebGUI::Asset->newById($session, $id); }; + next ID if Exception::Class->caught(); next ID unless $asset->get('isPrototype'); next ID unless ($asset->get('status') eq 'approved' || $asset->get('tagId') eq $session->scratch->get("versionTag")); push @assets, $asset;