Refactored translation of exception messages

This commit is contained in:
El RIDO 2025-11-19 09:36:08 +01:00
parent 3e6f1733f9
commit 3a23117ebf
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
24 changed files with 186 additions and 110 deletions

View file

@ -11,7 +11,7 @@
namespace PrivateBin;
use Exception;
use PrivateBin\Exception\JsonException;
use PrivateBin\Model\Paste;
/**
@ -113,7 +113,7 @@ class Request
try {
$data = file_get_contents(self::$_inputStream);
$this->_params = Json::decode($data);
} catch (Exception $e) {
} catch (JsonException $e) {
// ignore error, $this->_params will remain empty
}
break;