| Pangloss documentation | view source | Contained in the Pangloss distribution. |
Pangloss::StoredObject::Error - base class for stored object errors.
# abstract - cannot be used directly
package SomeError;
use base qw( Pangloss::StoredObject::Error );
throw SomeError( flag => eExists, ... );
throw SomeError( flag => eNonExistent, ... );
throw SomeError( flag => eInvalid, invalid => { ... });
# with caught errors:
print $e->flag;
do { ... } if $e->isExists;
do { ... } if $e->isNonexistent;
do { ... } if $e->isInvalid;
Stored Object Errors class. Inherits interface from Pangloss::Error. Introduces validation error flags.
Error flags: eExists eInvalid eNonExistent
Validation errors: eNameRequired eCreatorRequired eDateRequired
set/get hash of validation error flags.
Test if this error's flag is equal to $flag. if this is a validation error also checks in the $e->invalid hash for $flag.
Test if this error's flag is equal to the named flag.
Refactor some of this out to OpenFrame::WebApp.
Write name(), date(), and creator() shortcuts to see if flag is associated with the given instance variable.
Steve Purkis <spurkis@quiup.com>
| Pangloss documentation | view source | Contained in the Pangloss distribution. |