updated to use exceptions rather than croak
This commit is contained in:
parent
5aafd17f5a
commit
57cd7b6473
2 changed files with 17 additions and 7 deletions
|
|
@ -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 "") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue