Add coverage tests, convert croaks to exceptions.
This commit is contained in:
parent
cd55ff1a9e
commit
d27ac7a629
4 changed files with 55 additions and 10 deletions
|
|
@ -2,7 +2,6 @@ package WebGUI::Shop::Ship;
|
|||
|
||||
use strict;
|
||||
|
||||
use Carp qw(croak);
|
||||
use WebGUI::International;
|
||||
use WebGUI::Shop::ShipDriver;
|
||||
use WebGUI::Pluggable;
|
||||
|
|
@ -104,8 +103,9 @@ A WebGUI::Session object. A WebGUI::Error::InvalidParam exception will be throw
|
|||
sub getOptions {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
croak "Definition requires a session object"
|
||||
WebGUI::Error::InvalidParam->throw(error => q{Must provide a session variable})
|
||||
unless ref $session eq 'WebGUI::Session';
|
||||
return;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue