aboutsummaryrefslogtreecommitdiff
path: root/lib/exceptions/NotFoundException.php
diff options
context:
space:
mode:
authorMurtaza Sultani <sultani@data-quest.de>2026-01-15 17:10:04 +0100
committerMurtaza Sultani <sultani@data-quest.de>2026-01-15 17:10:04 +0100
commitc3e07e221b0bef64d3ad4da48c6371c75ca12cc3 (patch)
treea2da9becb70c334b38cdf429f77257167d37993b /lib/exceptions/NotFoundException.php
parent083da68644d230b8a4b1d8201ed832a5206d3d5c (diff)
Resolve "Neues Forum Polishing", #6064, #6063, #6151
Closes #6165 Merge request studip/studip!4671
Diffstat (limited to 'lib/exceptions/NotFoundException.php')
-rw-r--r--lib/exceptions/NotFoundException.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/exceptions/NotFoundException.php b/lib/exceptions/NotFoundException.php
new file mode 100644
index 0000000..d1ed900
--- /dev/null
+++ b/lib/exceptions/NotFoundException.php
@@ -0,0 +1,29 @@
+<?php
+declare(strict_types=1);
+
+class NotFoundException extends Exception
+{
+ private array $details = [];
+
+ public function __construct(
+ string $message = '',
+ int $code = 0,
+ ?Throwable $previous = null
+ ) {
+ parent::__construct(
+ $message ?: _('Die angeforderte Ressource wurde nicht gefunden.'),
+ $code ?: 404,
+ $previous
+ );
+ }
+
+ public function setDetails(array $details): void
+ {
+ $this->details = $details;
+ }
+
+ public function getDetails(): array
+ {
+ return $this->details;
+ }
+}