| 1 | package Geoffrey::Exception::Database; | ||
| 2 | |||
| 3 | 14 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 14 | ▶ | use 5.016; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 14 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 14 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 14 | ▶ | use Carp qw/longmess/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 14 | $Geoffrey::Exception::Database::VERSION = '0.000206'; | |
| 10 | |||
| 11 | 14 | ▶ | use Exception::Class 1.23 ( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 14 | 'Geoffrey::Exception::Database' => { description => 'Unidentified exception', }, | |
| 13 | 'Geoffrey::Exception::Database::NoDbh' => | ||
| 14 | { description => 'No default value set for column in table!', }, | ||
| 15 | 'Geoffrey::Exception::Database::NotDbh' => | ||
| 16 | { description => 'Given dbh is in a non valid type!', }, | ||
| 17 | 'Geoffrey::Exception::Database::SqlHandle' => | ||
| 18 | { description => 'No default value set for column in table!', }, | ||
| 19 | 'Geoffrey::Exception::Database::CorruptChangeset' => | ||
| 20 | { description => 'No default value set for column in table!', }, | ||
| 21 | 14 | ); | |
| 22 | |||
| 23 | 5 | ▶ | sub throw_no_dbh { |
|
Subroutine
throw_no_dbh: called CC=1 SCAR=0.0
Pod
documented
| |||
| 24 | 5 | return Geoffrey::Exception::Database::NoDbh->throw( | |
| 25 | "No default dbh value is set\n" . longmess ); | ||
| 26 | } | ||
| 27 | |||
| 28 | 1 | ▶ | sub throw_not_dbh { |
|
Subroutine
throw_not_dbh: called CC=1 SCAR=0.0
Pod
documented
| |||
| 29 | 1 | return Geoffrey::Exception::Database::NotDbh->throw( | |
| 30 | "Given dbh is in a non valid type\n" . longmess ); | ||
| 31 | } | ||
| 32 | |||
| 33 | 5 | ▶ | sub throw_sql_handle { |
|
Subroutine
throw_sql_handle: called CC=1 SCAR=0.0
Pod
documented
| |||
| 34 | 5 | my ( $s_throw_message, $s_sql ) = @_; | |
| 35 | 5 | return Geoffrey::Exception::Database::SqlHandle->throw( | |
| 36 | "Can't handle sql: $s_sql $s_throw_message\n" . longmess ); | ||
| 37 | } | ||
| 38 | |||
| 39 | 1 | ▶ | sub throw_changeset_corrupt { |
|
Subroutine
throw_changeset_corrupt: called CC=1 SCAR=0.0
Pod
documented
| |||
| 40 | 1 | my ( $id, $value, $resp ) = @_; | |
| 41 | 1 | return Geoffrey::Exception::Database::CorruptChangeset->throw( | |
| 42 | "MD5 hash changed for changeset: $id expect $value got $resp\n" . longmess ); | ||
| 43 | } | ||
| 44 | |||
| 45 | 14 | 1; | |
| 46 | |||
| 47 | __END__ | ||