Bug 19531: When saving patron record do not redirect to circ if not authorised
[koha.git] / Koha / Exceptions.pm
blob528a15106b11e8088782c4c14f899b890a8f504b
1 package Koha::Exceptions;
3 use Modern::Perl;
5 use Exception::Class (
7 # General exceptions
8 'Koha::Exceptions::Exception' => {
9 description => 'Something went wrong!',
11 'Koha::Exceptions::BadParameter' => {
12 isa => 'Koha::Exceptions::Exception',
13 description => 'Bad parameter was given',
14 fields => ["parameter"],
16 'Koha::Exceptions::DuplicateObject' => {
17 isa => 'Koha::Exceptions::Exception',
18 description => 'Same object already exists',
20 'Koha::Exceptions::ObjectNotFound' => {
21 isa => 'Koha::Exceptions::Exception',
22 description => 'The required object doesn\'t exist',
24 'Koha::Exceptions::CannotDeleteDefault' => {
25 isa => 'Koha::Exceptions::Exception',
26 description => 'The default value cannot be deleted'
28 'Koha::Exceptions::MissingParameter' => {
29 isa => 'Koha::Exceptions::Exception',
30 description => 'A required parameter is missing'
32 'Koha::Exceptions::WrongParameter' => {
33 isa => 'Koha::Exceptions::Exception',
34 description => 'One or more parameters are wrong',
36 'Koha::Exceptions::CannotAddLibraryLimit' => {
37 isa => 'Koha::Exceptions::Exception',
38 description => 'General problem adding a library limit'
40 'Koha::Exceptions::UnderMaintenance' => {
41 isa => 'Koha::Exceptions::Exception',
42 description => 'Koha is under maintenance.'
44 # Virtualshelves exceptions
45 'Koha::Exceptions::Virtualshelves::DuplicateObject' => {
46 isa => 'Koha::Exceptions::DuplicateObject',
47 description => "Duplicate shelf object",
49 'Koha::Exceptions::Virtualshelves::InvalidInviteKey' => {
50 isa => 'Koha::Exceptions::Exception',
51 description => 'Invalid key on accepting the share',
53 'Koha::Exceptions::Virtualshelves::InvalidKeyOnSharing' => {
54 isa => 'Koha::Exceptions::Exception',
55 description=> 'Invalid key on sharing a shelf',
57 'Koha::Exceptions::Virtualshelves::ShareHasExpired' => {
58 isa => 'Koha::Exceptions::Exception',
59 description=> 'Cannot share this shelf, the share has expired',
61 'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' => {
62 isa => 'Koha::Exceptions::Exception',
63 description => "Invalid use of database administrator account",