mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-15 04:46:49 +01:00
* [ADD] Added mime type file checking instead of extension. Thanks to @vmario89 for the feedback. Related #825
* [MOD] Improved exception handling in controllers Signed-off-by: nuxsmin <nuxsmin@syspass.org>
This commit is contained in:
@@ -121,6 +121,8 @@ final class NotificationController extends ControllerBase implements CrudControl
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
@@ -203,6 +205,8 @@ final class NotificationController extends ControllerBase implements CrudControl
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
@@ -235,6 +239,8 @@ final class NotificationController extends ControllerBase implements CrudControl
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
@@ -288,6 +294,8 @@ final class NotificationController extends ControllerBase implements CrudControl
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
@@ -321,6 +329,8 @@ final class NotificationController extends ControllerBase implements CrudControl
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
@@ -352,6 +362,8 @@ final class NotificationController extends ControllerBase implements CrudControl
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
@@ -387,6 +399,8 @@ final class NotificationController extends ControllerBase implements CrudControl
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user