From edcbd95250a6107f640512c611cde0bd14cc8314 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 27 Oct 2009 13:49:13 -0700 Subject: [PATCH] Have getIsa throw exceptions, instead of croaking. --- lib/WebGUI/Asset.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index f687aba1e..4ab569fda 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1263,7 +1263,11 @@ sub getIsa { $sth->finish; return undef; } - return WebGUI::Asset->newPending($session, $assetId); + my $asset = WebGUI::Asset->newByDynamicClass($session, $assetId); + if (!$asset) { + WebGUI::Error::ObjectNotFound->throw(id => $assetId); + } + return $asset; }; }