Bugzilla – Attachment 65106 Details for
Bug 18137
Migrate from Mojolicious::Plugin::Swagger2 to Mojolicious::Plugin::OpenAPI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18137: Add useful Koha::Exceptions
Bug-18137-Add-useful-KohaExceptions.patch (text/plain), 3.04 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-07-19 16:34:23 UTC
(
hide
)
Description:
Bug 18137: Add useful Koha::Exceptions
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-07-19 16:34:23 UTC
Size:
3.04 KB
patch
obsolete
>From c878ed84bfb0f62f64749c5b18bc415a0bf16173 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Fri, 17 Feb 2017 14:34:42 +0200 >Subject: [PATCH] Bug 18137: Add useful Koha::Exceptions > >Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Exceptions.pm | 9 +++++++++ > Koha/Exceptions/Authentication.pm | 21 +++++++++++++++++++++ > Koha/Exceptions/Authorization.pm | 18 ++++++++++++++++++ > 3 files changed, 48 insertions(+) > create mode 100644 Koha/Exceptions/Authentication.pm > create mode 100644 Koha/Exceptions/Authorization.pm > >diff --git a/Koha/Exceptions.pm b/Koha/Exceptions.pm >index 60b9e6a..528a151 100644 >--- a/Koha/Exceptions.pm >+++ b/Koha/Exceptions.pm >@@ -8,6 +8,11 @@ use Exception::Class ( > 'Koha::Exceptions::Exception' => { > description => 'Something went wrong!', > }, >+ 'Koha::Exceptions::BadParameter' => { >+ isa => 'Koha::Exceptions::Exception', >+ description => 'Bad parameter was given', >+ fields => ["parameter"], >+ }, > 'Koha::Exceptions::DuplicateObject' => { > isa => 'Koha::Exceptions::Exception', > description => 'Same object already exists', >@@ -32,6 +37,10 @@ use Exception::Class ( > isa => 'Koha::Exceptions::Exception', > description => 'General problem adding a library limit' > }, >+ 'Koha::Exceptions::UnderMaintenance' => { >+ isa => 'Koha::Exceptions::Exception', >+ description => 'Koha is under maintenance.' >+ }, > # Virtualshelves exceptions > 'Koha::Exceptions::Virtualshelves::DuplicateObject' => { > isa => 'Koha::Exceptions::DuplicateObject', >diff --git a/Koha/Exceptions/Authentication.pm b/Koha/Exceptions/Authentication.pm >new file mode 100644 >index 0000000..74688ab >--- /dev/null >+++ b/Koha/Exceptions/Authentication.pm >@@ -0,0 +1,21 @@ >+package Koha::Exceptions::Authentication; >+ >+use Modern::Perl; >+ >+use Exception::Class ( >+ >+ 'Koha::Exceptions::Authentication' => { >+ description => 'Something went wrong!', >+ }, >+ 'Koha::Exceptions::Authentication::Required' => { >+ isa => 'Koha::Exceptions::Authentication', >+ description => 'Authentication required' >+ }, >+ 'Koha::Exceptions::Authentication::SessionExpired' => { >+ isa => 'Koha::Exceptions::Authentication', >+ description => 'Session has been expired', >+ }, >+ >+); >+ >+1; >diff --git a/Koha/Exceptions/Authorization.pm b/Koha/Exceptions/Authorization.pm >new file mode 100644 >index 0000000..a3c625a >--- /dev/null >+++ b/Koha/Exceptions/Authorization.pm >@@ -0,0 +1,18 @@ >+package Koha::Exceptions::Authorization; >+ >+use Modern::Perl; >+ >+use Exception::Class ( >+ >+ 'Koha::Exceptions::Authorization' => { >+ description => 'Something went wrong!', >+ }, >+ 'Koha::Exceptions::Authorization::Unauthorized' => { >+ isa => 'Koha::Exceptions::Authorization', >+ description => 'Unauthorized', >+ fields => ['required_permissions'] >+ }, >+ >+); >+ >+1; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18137
:
60490
|
60491
|
60492
|
60493
|
60494
|
60495
|
60533
|
60837
|
60838
|
60839
|
60840
|
60841
|
60842
|
60843
|
60866
|
60867
|
61163
|
61166
|
62780
|
62781
|
62782
|
62783
|
62784
|
62785
|
62786
|
62787
|
62788
|
62789
|
62816
|
63025
|
63026
|
63027
|
63028
|
63029
|
63030
|
63031
|
63032
|
63033
|
63034
|
63177
|
63178
|
63179
|
63180
|
63181
|
63182
|
63183
|
63184
|
63185
|
63186
|
63187
|
63188
|
63189
|
63190
|
63191
|
63192
|
63193
|
63194
|
63195
|
63196
|
63283
|
65106
|
65107
|
65108
|
65109
|
65110
|
65111
|
65112
|
65113
|
65114
|
65115
|
65404
|
65713
|
65714
|
66802
|
66803
|
66804
|
66805
|
66806
|
66807
|
66808
|
66809
|
66810
|
66811
|
66812
|
66813
|
66814
|
66815
|
66816
|
66817
|
66818
|
66819