The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Type::Exception - base classes for exceptions

SYNOPSIS

  try
  {
    valid( 'muenalan<haaar..harr>cpan.org', STD::EMAIL );
  }
  catch Data::Type::Exception with
  {
    dump( $e ) foreach @_;
  };

DESCRIPTION

Exceptions are inherited from Class::Maker::Exception which is a wrapper for the Error module. Data::Type::Exception is the base class inheriting from Class::Maker::Exception.

Data::Type::Exception

ATTRIBUTES

$dte->file

The filename where the exception was thrown.

$dte->line

The line number.

$dte->type

The type 'object' used for verification.

$dte->value

Reference to the data subjected to verification.

$dte->catched

List of embedded sub-exceptions or other diagnostic details.

METHODS

$dte->to_text

A simple textual representation of the exception. Generally a very primitiv printf.

$dte->to_dump

Dumps the complete exception via dump() from Data::Dump.

Data::Type::Facet::Exception

Only interesting if you are creating custom types. This exception is thrown in the verification process if a facet (which is a subelement of the verification process) fails.

SEE ALSO

Class::Maker::Exception.

CONTACT

Sourceforge http://sf.net/projects/datatype is hosting a project dedicated to this module. And I enjoy receiving your comments/suggestion/reports also via http://rt.cpan.org or http://testers.cpan.org.

AUTHOR

Murat Uenalan, <muenalan@cpan.org>