From 886a896f27672493d71e67eb7f0d8cf6e8c57170 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 22 Jan 2010 15:15:59 -0800 Subject: [PATCH] Note in POD which methods throw exceptions, and why. --- lib/WebGUI/Asset.pm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index f7609b088..d5d080760 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -777,6 +777,9 @@ sub getAdminConsole { Class method that looks up a className for an object in the database, using it's assetId. +If a class cannot be found for the requested assetId, then it throws a WebGUI::Error::InvalidParam +exception. + =head3 $session A WebGUI::Session object. @@ -1608,6 +1611,10 @@ Loads an asset module if it's not already in memory. This is a class method. Ret undef on failure to load, otherwise returns the classname. Will only load classes in the WebGUI::Asset namespace. +Throws a WebGUI::Invalid::Param error if a non-WebGUI::Asset class is requested to be +loaded. If there are compilation problems, it will throw a WebGUI::Error::Compile +exception. + =cut sub loadModule { @@ -1712,7 +1719,9 @@ A reference to the current session. =head3 assetId -Must be a valid assetId +Must be a valid assetId. + +Throws a WebGUI::Error::InvalidParam exception if the assetId is not passed. =head3 revisionDate @@ -1823,7 +1832,9 @@ A reference to the current session. =head3 assetId -The asset's id +The asset's id. If an assetId is not passed, throws a WebGUI::Error::InvalidParam exception. If +a revision cannot be found for the requested assetId, then it throws a WebGUI::Error::InvalidParam +exception. =cut