Have getIsa throw exceptions, instead of croaking.

This commit is contained in:
Colin Kuskie 2009-10-27 13:49:13 -07:00
parent 8d45d94e86
commit edcbd95250

View file

@ -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;
};
}