From f92f0d706acaa8bfac6efb5dccb0e718e7dd457a Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 28 Jan 2010 13:12:44 -0800 Subject: [PATCH] Update Keywords for WebGUI::Definition and exceptions. --- lib/WebGUI/Keyword.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Keyword.pm b/lib/WebGUI/Keyword.pm index c0a2e4936..a7490a968 100644 --- a/lib/WebGUI/Keyword.pm +++ b/lib/WebGUI/Keyword.pm @@ -128,7 +128,10 @@ sub findKeywords { $parentAsset = $options->{asset}; } if ($options->{assetId}) { - $parentAsset = WebGUI::Asset->new($self->session, $options->{assetId}); + $parentAsset = eval { WebGUI::Asset->newById($self->session, $options->{assetId}); }; + if (Exception::Class->caught()) { + $self->session->log->error("Keywords: error instanciating parentAsset by assetId ". $options->{assetId}.": $@"); + } } if ($parentAsset) { $sql .= ' INNER JOIN asset USING (assetId)';