* [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:
nuxsmin
2018-11-10 21:41:07 +01:00
parent a159569e74
commit ed956eec54
53 changed files with 924 additions and 179 deletions

View File

@@ -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);
}
}