Update Shop for new instanciators and for exception handling.

This commit is contained in:
Colin Kuskie 2010-03-03 21:07:38 -08:00
parent 03427eed10
commit ecc71d455d
6 changed files with 16 additions and 10 deletions

View file

@ -132,8 +132,8 @@ Returns an instanciated WebGUI::Asset::Sku object for this item.
sub getSku {
my ($self) = @_;
my $asset = WebGUI::Asset->newById($self->transaction->session, $self->get("assetId"));
if (defined $asset) {
my $asset = eval { WebGUI::Asset->newById($self->transaction->session, $self->get("assetId")); };
if (Exception::Class->caught()) {
$asset->applyOptions($self->get("options"));
return $asset;
}