Have getIsa throw exceptions, instead of croaking.
This commit is contained in:
parent
8d45d94e86
commit
edcbd95250
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue