Revert the sense of the exception handling, to the right state.
This commit is contained in:
parent
5759620eb4
commit
ae88345e04
1 changed files with 4 additions and 4 deletions
|
|
@ -134,11 +134,11 @@ sub getSku {
|
|||
my ($self) = @_;
|
||||
my $asset = eval { WebGUI::Asset->newById($self->transaction->session, $self->get("assetId")); };
|
||||
if (Exception::Class->caught()) {
|
||||
$asset->applyOptions($self->get("options"));
|
||||
return $asset;
|
||||
WebGUI::Error::ObjectNotFound->throw(error=>'SKU Asset '.$self->get('assetId').' could not be instanciated. Perhaps it no longer exists.', id=>$self->get('assetId'));
|
||||
return undef;
|
||||
}
|
||||
WebGUI::Error::ObjectNotFound->throw(error=>'SKU Asset '.$self->get('assetId').' could not be instanciated. Perhaps it no longer exists.', id=>$self->get('assetId'));
|
||||
return undef;
|
||||
$asset->applyOptions($self->get("options"));
|
||||
return $asset;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue