refactored exceptions in controller

- added missing exception doc blocks
- introduced exception type that translates message during construction
- catch explicit exception types where possible
This commit is contained in:
El RIDO 2025-11-17 17:28:13 +01:00
parent fdd2c67b49
commit 3e6f1733f9
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
10 changed files with 105 additions and 53 deletions

View file

@ -91,6 +91,7 @@ return array(
'PrivateBin\\Proxy\\YourlsProxy' => $baseDir . '/lib/Proxy/YourlsProxy.php',
'PrivateBin\\Request' => $baseDir . '/lib/Request.php',
'PrivateBin\\TemplateSwitcher' => $baseDir . '/lib/TemplateSwitcher.php',
'PrivateBin\\TranslatedException' => $baseDir . '/lib/TranslatedException.php',
'PrivateBin\\View' => $baseDir . '/lib/View.php',
'PrivateBin\\Vizhash16x16' => $baseDir . '/lib/Vizhash16x16.php',
'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',

View file

@ -139,6 +139,7 @@ class ComposerStaticInitDontChange
'PrivateBin\\Proxy\\YourlsProxy' => __DIR__ . '/../..' . '/lib/Proxy/YourlsProxy.php',
'PrivateBin\\Request' => __DIR__ . '/../..' . '/lib/Request.php',
'PrivateBin\\TemplateSwitcher' => __DIR__ . '/../..' . '/lib/TemplateSwitcher.php',
'PrivateBin\\TranslatedException' => __DIR__ . '/../..' . '/lib/TranslatedException.php',
'PrivateBin\\View' => __DIR__ . '/../..' . '/lib/View.php',
'PrivateBin\\Vizhash16x16' => __DIR__ . '/../..' . '/lib/Vizhash16x16.php',
'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',

View file

@ -3,7 +3,7 @@
'name' => 'privatebin/privatebin',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '06496a1b0e975b79c5a7abc0bd54b492ca264640',
'reference' => 'a051c4bd6b71fd56f0d7fc235e815dafc8eb54ea',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -31,7 +31,7 @@
'privatebin/privatebin' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '06496a1b0e975b79c5a7abc0bd54b492ca264640',
'reference' => 'a051c4bd6b71fd56f0d7fc235e815dafc8eb54ea',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),