From d3600e31d42e65c64179ad66ddda43771af366b6 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 26 Feb 2008 22:48:10 +0000 Subject: [PATCH] added WrongObjectType --- lib/WebGUI/Exception.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/WebGUI/Exception.pm b/lib/WebGUI/Exception.pm index e9866b1d0..7ec5153a9 100644 --- a/lib/WebGUI/Exception.pm +++ b/lib/WebGUI/Exception.pm @@ -25,6 +25,11 @@ use Exception::Class ( description => "The object you were try to retrieve does not exist.", fields => ["id"], }, + 'WebGUI::Error::WrongObjectType' => { + isa => 'WebGUI::Error', + description => "Expected to get a reference to an object type that wasn't gotten.", + fields => ["expected","got"], + }, ); @@ -100,6 +105,20 @@ The id of the object to be retrieved. =cut +=head2 WebGUI::Error::WrongObjectType + +Used when looking to make sure objects are passed in that you expect. ISA WebGUI::Error. + +=head3 expected + +The type of object expected ("HASH", "ARRAY", "WebGUI::User", etc). + +=head3 got + +The object type we got. + +=cut + 1;