Add assertion that terminate clio (#994)

Fixes #893.

Also added termination handler to print backtrace on crash, so fixes #929.
This commit is contained in:
Sergey Kuznetsov
2023-11-21 13:06:04 +00:00
committed by GitHub
parent 3bab90ca7a
commit 8ebe2d6a80
41 changed files with 420 additions and 158 deletions

View File

@@ -19,6 +19,7 @@
#include <web/IntervalSweepHandler.h>
#include <util/Assert.h>
#include <util/Constants.h>
#include <web/DOSGuard.h>
@@ -47,9 +48,9 @@ IntervalSweepHandler::~IntervalSweepHandler()
void
IntervalSweepHandler::setup(web::BaseDOSGuard* guard)
{
assert(dosGuard_ == nullptr);
ASSERT(dosGuard_ == nullptr, "Cannot setup DOS guard more than once");
dosGuard_ = guard;
assert(dosGuard_ != nullptr);
ASSERT(dosGuard_ != nullptr, "DOS guard must be not null");
createTimer();
}