Eidolon::Driver::DB::Exceptions - Eidolon database driver exceptions.


Eidolon documentation Contained in the Eidolon distribution.

Index


Code Index:

NAME

Top

Eidolon::Driver::DB::Exceptions - Eidolon database driver exceptions.

SYNOPSIS

Top

In error handler of your application (lib/Example/Error.pm) you could write:

    if ($e eq "DriverError::DB::SQL")
    {
        print "You have an error in your SQL syntax!";
    }
    else
    {
        $e->rethrow();
    }

DESCRIPTION

Top

The Eidolon::Driver::DB::Exceptions package creates database driver exceptions that are used by all database drivers.

EXCEPTIONS

Top

Error::Driver::DB

Base database driver exception. All other database driver exceptions subclass it.

Error::Driver::DB::Connect

Database connection error. Thrown when driver cannot connect or login to database engine.

Error::Driver::DB::SQL

Database SQL execution error. Thrown in case of invalid SQL command.

SEE ALSO

Top

Eidolon, Eidolon::Driver::Exceptions, Eidolon::Core::Exception, Eidolon::Core::Exception::Builder

LICENSE

Top

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Top

Anton Belousov, <abel@cpan.org>

COPYRIGHT

Top


Eidolon documentation Contained in the Eidolon distribution.

package Eidolon::Driver::DB::Exceptions;
# ==============================================================================
#
#   Eidolon
#   Copyright (c) 2009, Atma 7
#   ---
#   Eidolon/Driver/DB/Exceptions.pm - database driver exceptions
#
# ==============================================================================

use warnings;
use strict;

our $VERSION = "0.02"; # 2009-05-14 05:36:22

use Eidolon::Core::Exception::Builder 
(
    "DriverError::DB" => 
    {
        "isa"   => "DriverError",
        "title" => "Database driver error"
    },

    "DriverError::DB::Connect" => 
    {
        "isa"   => "DriverError::DB",
        "title" => "Database connect error"
    },

    "DriverError::DB::SQL" => 
    {
        "isa"   => "DriverError::DB",
        "title" => "SQL query error"
    },

    "DriverError::DB::AlreadyFetched" =>
    {
        "isa"   => "DriverError::DB",
        "title" => "Data is already fetched during query execution (auto_fetch option is on)"
    }
);

1;

__END__