| 1 | package Fey::ORM::Exceptions; | ||||||||||
| 2 | { | ||||||||||
| 3 | 9 | $Fey::ORM::Exceptions::VERSION = '0.46'; | |||||||||
| 4 | } | ||||||||||
| 5 | |||||||||||
| 6 | 9 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 9 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 9 | ▶ | use Fey::Exceptions; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 9 | my %E; | |||||||||
| 12 | |||||||||||
| 13 | BEGIN { | ||||||||||
| 14 | 9 | ▶ | %E = ( | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 'Fey::Exception::NoSuchRow' => { | ||||||||||
| 16 | description => 'No row was found for a specified key.', | ||||||||||
| 17 | isa => 'Fey::Exception', | ||||||||||
| 18 | alias => 'no_such_row', | ||||||||||
| 19 | }, | ||||||||||
| 20 | ); | ||||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 9 | ▶ | use Exception::Class (%E); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | |||||||||||
| 25 | 9 | Fey::Exception->Trace(1); | |||||||||
| 26 | |||||||||||
| 27 | use Sub::Exporter -setup => | ||||||||||
| 28 | 9 | ▶ | { exports => [ map { $_->{alias} || () } values %E ] }; | ||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=7.0
Branch: 1 branch
| |||||||||||
| 29 | |||||||||||
| 30 | 9 | 1; | |||||||||
| 31 | |||||||||||
| 32 | # ABSTRACT: Defines exceptions used for Fey::ORM | ||||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||
| 35 | |||||||||||
| 36 | =pod | ||||||||||
| 37 | |||||||||||
| 38 | =head1 NAME | ||||||||||
| 39 | |||||||||||
| 40 | Fey::ORM::Exceptions - Defines exceptions used for Fey::ORM | ||||||||||
| 41 | |||||||||||
| 42 | =head1 VERSION | ||||||||||
| 43 | |||||||||||
| 44 | version 0.46 | ||||||||||
| 45 | |||||||||||
| 46 | =head1 SYNOPSIS | ||||||||||
| 47 | |||||||||||
| 48 | use Fey::ORM::Exceptions qw( no_such_row ); | ||||||||||
| 49 | |||||||||||
| 50 | =head1 DESCRIPTION | ||||||||||
| 51 | |||||||||||
| 52 | This module defines the exceptions which are used by the core Fey | ||||||||||
| 53 | classes. | ||||||||||
| 54 | |||||||||||
| 55 | =head1 EXCEPTIONS | ||||||||||
| 56 | |||||||||||
| 57 | Loading this module defines the exception classes using | ||||||||||
| 58 | C<Exception::Class>. This module also exports subroutines which can be | ||||||||||
| 59 | used as a shorthand to throw a specific type of exception. | ||||||||||
| 60 | |||||||||||
| 61 | =head2 Fey::ORM::Exceptions | ||||||||||
| 62 | |||||||||||
| 63 | Cannot find a row in a given table matching the given values | ||||||||||
| 64 | |||||||||||
| 65 | =head2 no_such_row() | ||||||||||
| 66 | |||||||||||
| 67 | =head1 AUTHOR | ||||||||||
| 68 | |||||||||||
| 69 | Dave Rolsky <autarch@urth.org> | ||||||||||
| 70 | |||||||||||
| 71 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 72 | |||||||||||
| 73 | This software is copyright (c) 2011 by Dave Rolsky. | ||||||||||
| 74 | |||||||||||
| 75 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 76 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 77 | |||||||||||
| 78 | =cut | ||||||||||