updated to use exceptions rather than croak

This commit is contained in:
JT Smith 2008-02-26 23:14:48 +00:00
parent 5aafd17f5a
commit 57cd7b6473
2 changed files with 17 additions and 7 deletions

View file

@ -178,7 +178,7 @@ sub new {
WebGUI::Error::InvalidObject->throw(expected=>"WebGUI::Shop::Cart", got=>(ref $cart), error=>"Need a cart.");
}
unless (defined $itemId) {
WebGUI::Error::InvalidObject->throw(error=>"Need an itemId.");
WebGUI::Error::InvalidParam->throw(error=>"Need an itemId.");
}
my $item = $cart->session->db->quickHashRef('select * from cartItems where itemId=?', [$itemId]);
if ($item->{itemId} eq "") {