Use error macros in HTTPSessionManager and HTTPSessionManagerDB.

This commit is contained in:
Relintai 2022-12-18 14:28:38 +01:00
parent 225e3ff79c
commit b8b51e7525
2 changed files with 3 additions and 13 deletions

View File

@ -185,11 +185,7 @@ void HTTPSessionManagerDB::load_sessions() {
}
}
if (!s.is_valid()) {
printf("Error: HTTPSessionManagerDB::load_sessions(): %d sid doesn't exists!\n", session_db_id);
continue;
}
ERR_CONTINUE_MSG(!s.is_valid(), vformat("Error: HTTPSessionManagerDB::load_sessions(): %d sid doesn't exists!", session_db_id));
String key = r->get_cell(1);
String vb64 = r->get_cell(2);

View File

@ -14,10 +14,7 @@
#include "web_server_request.h"
void HTTPSessionManager::add_session(Ref<HTTPSession> session) {
if (!session.is_valid()) {
printf("HTTPSessionManager::add_session: ERROR, session is null!\n");
return;
}
ERR_FAIL_COND(!session.is_valid());
_mutex.lock();
@ -28,10 +25,7 @@ void HTTPSessionManager::add_session(Ref<HTTPSession> session) {
}
void HTTPSessionManager::remove_session(Ref<HTTPSession> session) {
if (!session.is_valid()) {
printf("HTTPSessionManager::remove_session: ERROR, session is null!\n");
return;
}
ERR_FAIL_COND(!session.is_valid());
_mutex.lock();