aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/exceptions
diff options
context:
space:
mode:
authorArthurHoaro <arthur.hoareau@wizacha.com>2020-07-07 10:15:56 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commitc4ad3d4f061d05a01db25aa54dda830ba776792d (patch)
tree691d91a5b0bbac62cee41f7b95ad1daa38d610b3 /application/front/exceptions
parent1a8ac737e52cb25a5c346232ee398f5908cee7d7 (diff)
downloadShaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.tar.gz
Shaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.tar.zst
Shaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.zip
Process Shaarli install through Slim controller
Diffstat (limited to 'application/front/exceptions')
-rw-r--r--application/front/exceptions/AlreadyInstalledException.php15
-rw-r--r--application/front/exceptions/ResourcePermissionException.php13
2 files changed, 28 insertions, 0 deletions
diff --git a/application/front/exceptions/AlreadyInstalledException.php b/application/front/exceptions/AlreadyInstalledException.php
new file mode 100644
index 00000000..4add86cf
--- /dev/null
+++ b/application/front/exceptions/AlreadyInstalledException.php
@@ -0,0 +1,15 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Shaarli\Front\Exception;
6
7class AlreadyInstalledException extends ShaarliFrontException
8{
9 public function __construct()
10 {
11 $message = t('Shaarli has already been installed. Login to edit the configuration.');
12
13 parent::__construct($message, 401);
14 }
15}
diff --git a/application/front/exceptions/ResourcePermissionException.php b/application/front/exceptions/ResourcePermissionException.php
new file mode 100644
index 00000000..8fbf03b9
--- /dev/null
+++ b/application/front/exceptions/ResourcePermissionException.php
@@ -0,0 +1,13 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Shaarli\Front\Exception;
6
7class ResourcePermissionException extends ShaarliFrontException
8{
9 public function __construct(string $message)
10 {
11 parent::__construct($message, 500);
12 }
13}