| OpenFrame-WebApp documentation | Contained in the OpenFrame-WebApp distribution. |
OpenFrame::WebApp::Template::Error - Template errors
use OpenFrame::WebApp::Template::Error;
throw OpenFrame::WebApp::Template::Error( flag => eTemplateError,
message => $text,
template => $file );
Template Error class. Inherits interface from OpenFrame::WebApp::Error.
eTemplateError eTemplateNotFound
set/get error message emitted by the template processing engine (if any).
set/get template file associated with this error (if any).
Steve Purkis <spurkis@quiup.com>
Copyright (c) 2003 Steve Purkis. All rights reserved. Released under the same license as Perl itself.
| OpenFrame-WebApp documentation | Contained in the OpenFrame-WebApp distribution. |
package OpenFrame::WebApp::Template::Error; use utf8; use strict; use warnings::register; our $VERSION = (split(/ /, ' $Revision: 1.3 $ '))[2]; our @EXPORT = qw( eTemplateError eTemplateNotFound ); use base qw( Exporter OpenFrame::WebApp::Error ); use constant eTemplateError => 'error.template.process'; use constant eTemplateNotFound => 'error.template.not.found'; sub new { my $class = shift; local $Error::Depth = $Error::Depth + 1; $class->SUPER::new(map { /^((?:message)|(?:template))$/ ? "-$1" : $_; } @_); } sub message { my $self = shift; if (@_) { $self->{-message} = shift; return $self; } else { return $self->{-message}; } } sub template { my $self = shift; if (@_) { $self->{-template} = shift; return $self; } else { return $self->{-template}; } } 1; __END__ #------------------------------------------------------------------------------