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

@ -28,6 +28,7 @@ use Exception::Class (
'WebGUI::Error::InvalidParam' => {
isa => 'WebGUI::Error',
description => "Expected to get a param we didn't get.",
fields => ["param"],
},
'WebGUI::Error::ObjectNotFound' => {
isa => 'WebGUI::Error',
@ -120,6 +121,10 @@ The object type we got.
Used when an invalid parameter is passed into a subroutine.
=head3 param
Used to return the bad parameter, if present.
=head2 WebGUI::Error::ObjectNotFound
Used when an object is trying to be retrieved, but does not exist. ISA WebGUI::Error.