OpenFrame::WebApp::Error::Abstract - error thrown by abstract methods.


OpenFrame-WebApp documentation Contained in the OpenFrame-WebApp distribution.

Index


Code Index:

NAME

Top

OpenFrame::WebApp::Error::Abstract - error thrown by abstract methods.

SYNOPSIS

Top

  use Error;
  use OpenFrame::WebApp::Error::Abstract;
  throw OpenFrame::WebApp::Error::Abstract( class => ref($self) );

DESCRIPTION

Top

This class inherits its interface from the Error module. On creation, '-text' is automatically set to a warning message containing the unimplemented method name and the offending package.

AUTHOR

Top

Steve Purkis <spurkis@epn.nu>

Inspired by Pipeline::Error::Abstract, by James A. Duncan.

COPYRIGHT

Top

SEE ALSO

Top

Error, OpenFrame::WebApp::Error


OpenFrame-WebApp documentation Contained in the OpenFrame-WebApp distribution.

package OpenFrame::WebApp::Error::Abstract;

use utf8;
use strict;
use warnings::register;

our $VERSION = (split(/ /, ' $Revision: 1.2 $ '))[2];

use base qw( Error );

sub new {
    my $class = shift;
    my %args  = @_;
    my $pkg   = $args{class};

    local $Error::Depth = $Error::Depth + 1;

    my ($sub, $d);
    ($d, $d, $d, $sub) = caller(2);

    my $text = "$pkg does not implement abstract method $sub\()!";

    $class->SUPER::new(-text => $text, @_);
}


1;


__END__