diff options
| author | Murtaza Sultani <sultani@data-quest.de> | 2026-01-15 17:10:04 +0100 |
|---|---|---|
| committer | Murtaza Sultani <sultani@data-quest.de> | 2026-01-15 17:10:04 +0100 |
| commit | c3e07e221b0bef64d3ad4da48c6371c75ca12cc3 (patch) | |
| tree | a2da9becb70c334b38cdf429f77257167d37993b /lib/exceptions/NotFoundException.php | |
| parent | 083da68644d230b8a4b1d8201ed832a5206d3d5c (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.php | 29 |
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; + } +} |
