added exceptions, docs, and removed disableCache
This commit is contained in:
parent
a34f584780
commit
af705232a8
7 changed files with 224 additions and 107 deletions
|
|
@ -51,8 +51,6 @@ These exception classes are defined in this class:
|
|||
|
||||
=cut
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error
|
||||
|
|
@ -85,11 +83,6 @@ A read only exception method that returns the package name where the exception w
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error' => {
|
||||
description => "A general error occured.",
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::OverrideMe
|
||||
|
|
@ -98,12 +91,6 @@ An interface was not overriden as expected.
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error::OverrideMe' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => 'This method should be overridden by subclasses.',
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::MethodNotFound
|
||||
|
|
@ -116,13 +103,6 @@ The method called.
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error::MethodNotFound' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => q|Called a method that doesn't exist.|,
|
||||
fields => 'method'
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::InvalidObject
|
||||
|
|
@ -139,13 +119,6 @@ The object type we got.
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error::InvalidObject' => {
|
||||
isa => 'WebGUI::Error::InvalidParam',
|
||||
description => "Expected to get a reference to an object type that wasn't gotten.",
|
||||
fields => ["expected","got"],
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::InvalidParam
|
||||
|
|
@ -158,13 +131,6 @@ Used to return the bad parameter, if present.
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error::InvalidParam' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "Expected to get a param we didn't get.",
|
||||
fields => ["param"],
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::ObjectNotFound
|
||||
|
|
@ -177,13 +143,6 @@ The id of the object to be retrieved.
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error::ObjectNotFound' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "The object you were trying to retrieve does not exist.",
|
||||
fields => ["id"],
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::ObjectNotFound::Template
|
||||
|
|
@ -196,13 +155,6 @@ The id of the object to be retrieved.
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error::ObjectNotFound::Template' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "The template an asset was trying to retrieve does not exist.",
|
||||
fields => [qw/templateId assetId/],
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::InvalidFile
|
||||
|
|
@ -219,13 +171,6 @@ The line the error was found on.
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error::InvalidFile' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "The file you have provided has errors.",
|
||||
fields => [qw{ brokenFile brokenLine }],
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::Template
|
||||
|
|
@ -234,12 +179,6 @@ Used when a template has parsing errors. ISA WebGUI::Error.
|
|||
|
||||
=cut
|
||||
|
||||
'WebGUI::Error::Template' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "A template has errors that prevent it from being processed.",
|
||||
},
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 WebGUI::Error::Connection
|
||||
|
|
@ -252,6 +191,67 @@ The name or configuration or URL of the resource trying to be accessed.
|
|||
|
||||
=cut
|
||||
|
||||
use Exception::Class (
|
||||
|
||||
'WebGUI::Error' => {
|
||||
description => "A general error occured.",
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::OverrideMe' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => 'This method should be overridden by subclasses.',
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::MethodNotFound' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => q|Called a method that doesn't exist.|,
|
||||
fields => 'method'
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::InvalidObject' => {
|
||||
isa => 'WebGUI::Error::InvalidParam',
|
||||
description => "Expected to get a reference to an object type that wasn't gotten.",
|
||||
fields => ["expected","got"],
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::InvalidParam' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "Expected to get a param we didn't get.",
|
||||
fields => ["param"],
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::ObjectNotFound' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "The object you were trying to retrieve does not exist.",
|
||||
fields => ["id"],
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::ObjectNotFound::Template' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "The template an asset was trying to retrieve does not exist.",
|
||||
fields => [qw/templateId assetId/],
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::InvalidFile' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "The file you have provided has errors.",
|
||||
fields => [qw{ brokenFile brokenLine }],
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::Template' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "A template has errors that prevent it from being processed.",
|
||||
},
|
||||
|
||||
|
||||
'WebGUI::Error::Connection' => {
|
||||
isa => 'WebGUI::Error',
|
||||
description => "Couldn't establish a connection.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue