Akimov Alexey > ORM-0.85.1 > ORM::Error

Download:
ORM-0.85.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 0.83   Source  

NAME ^

ORM::Error - Error container class.

SYNOPSIS ^

  $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 ^

new()

Constructor. Takes no argument. Returns empty error container.

OBJECT METHODS ^

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 ^

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 ^

ORM

ORM::Tutorial

AUTHOR ^

Alexey V. Akimov

COPYRIGHT AND LICENSE ^

Copyright (C) 2005-2006 Alexey V. Akimov

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

syntax highlighting: