ORM::Error - Error container class.


ORM documentation  | view source Contained in the ORM distribution.

Index


NAME

Top

ORM::Error - Error container class.

SYNOPSIS

Top

  $error = ORM::Error->new;
  Music::Song->find( error=>$error );

  print "Fatal error\n" if( $error->fatal );
  print "Some error\n" if( $error->any );

  $error->add_fatal( "Initiate fatal error" );
  $error->add_warn( "Initiate warning" );

  print $error->text;

CONSTRUCTORS

Top

new()

Constructor. Takes no argument. Returns empty error container.

OBJECT METHODS

Top

add_fatal( $error_message )

Add fatal error message to a container. Return value is undefined.

add_warn( $error_message )

Add warning to a container. Return value is undefined.

upto( $error_container )

If $error_container is specified then send all errors from $self container to $error_container or do nothing otherwise. Return value is undefined.

DESTROY

In future implementations will throw exception if errors were ignored by programmer.

OBJECT PROPERTIES

Top

fatal()

Takes no argument. Returns true if container has at least one fatal error.

any()

Takes no argument. Returns true if container is not empty.

text()

Takes no argument. Returns plain text description of errors from container.

SEE ALSO

Top

ORM

ORM::Tutorial

AUTHOR

Top

Alexey V. Akimov

COPYRIGHT AND LICENSE

Top


ORM documentation  | view source Contained in the ORM distribution.