Always use our own exception tree

This commit is contained in:
emeric
2018-07-26 10:26:49 +02:00
parent 853bcbe008
commit a31fb3c062
9 changed files with 27 additions and 20 deletions
+2 -1
View File
@@ -24,6 +24,7 @@
#include <Wt/WPushButton.h>
#include <Wt/Auth/Identity.h>
#include "utils/Exception.hpp"
#include "utils/Logger.hpp"
#include "common/Validators.hpp"
@@ -58,7 +59,7 @@ class InitWizardModel : public Wt::WFormModel
// Check if a user already exist
// If it's the case, just do nothing
if (!Database::User::getAll(LmsApp->getDboSession()).empty())
throw std::runtime_error("Admin user already created");
throw LmsException("Admin user already created");
// Create user
Wt::Auth::User authUser = LmsApp->getDb().getUserDatabase().registerNew();