aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controlleruser.php
diff options
context:
space:
mode:
authorVincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com>2020-04-29 02:00:10 +0200
committerGitHub <noreply@github.com>2020-04-29 02:00:10 +0200
commit3075127e848150da8b8d19b45325460346c415c6 (patch)
tree4b0e984fe5c75cdce4249952623b6c7f6926d78c /app/class/Controlleruser.php
parent35e428c077dac7e57e6f6833562c88ae4a9867da (diff)
parent1619c194a32c1496f9015a491f5fa9dff350d47e (diff)
downloadwcms-3075127e848150da8b8d19b45325460346c415c6.tar.gz
wcms-3075127e848150da8b8d19b45325460346c415c6.zip
Merge pull request #108 from vincent-peugnet/add-whoops
Add whoops
Diffstat (limited to 'app/class/Controlleruser.php')
-rw-r--r--app/class/Controlleruser.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/class/Controlleruser.php b/app/class/Controlleruser.php
index 53cf9b9..0345434 100644
--- a/app/class/Controlleruser.php
+++ b/app/class/Controlleruser.php
@@ -2,8 +2,7 @@
namespace Wcms;
-use Exception;
-use Throwable;
+use RuntimeException;
class Controlleruser extends Controller
{
@@ -38,7 +37,7 @@ class Controlleruser extends Controller
$user = $this->usermanager->get($this->user);
try {
$user->hydrateexception($_POST);
- } catch (\Throwable $th) {
+ } catch (RuntimeException $th) {
Model::sendflashmessage('There was a problem when updating preference : ' . $th->getMessage(), 'error');
}
if ($_POST['passwordhash']) {
@@ -63,7 +62,7 @@ class Controlleruser extends Controller
$user = $usermanager->get($_POST['user']);
$user->addbookmark($bookmark);
$usermanager->add($user);
- } catch (Throwable $th) {
+ } catch (RuntimeException $th) {
Logger::errorex($th, true);
Model::sendflashmessage('Error while creating bookmark : ' . $th->getMessage(), 'error');
}