Add a field to the InvalidParam exception.

Use it in Ship.pm for documenting bad requested classes, and test
its use.
This commit is contained in:
Colin Kuskie 2008-02-29 04:17:23 +00:00
parent d780700013
commit aab533623e
3 changed files with 8 additions and 2 deletions

View file

@ -109,7 +109,8 @@ isa_ok($e, 'WebGUI::Error::InvalidParam', 'create croaks without a configured cl
cmp_deeply(
$e,
methods(
error => 'The requested class WebGUI::Shop::ShipDriver::FreeShipping is not enabled in your WebGUI configuration file',
error => 'The requested class is not enabled in your WebGUI configuration file',
param => 'WebGUI::Shop::ShipDriver::FreeShipping',
),
'create croaks without a configured class',
);