mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
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:
@@ -20,6 +20,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <rpc/Errors.h>
|
||||
#include <util/Assert.h>
|
||||
#include <web/interface/ConnectionBase.h>
|
||||
|
||||
#include <boost/beast/http.hpp>
|
||||
@@ -82,7 +83,9 @@ public:
|
||||
case rpc::ClioError::rpcMALFORMED_ADDRESS:
|
||||
case rpc::ClioError::rpcINVALID_HOT_WALLET:
|
||||
case rpc::ClioError::rpcFIELD_NOT_FOUND_TRANSACTION:
|
||||
assert(false); // this should never happen
|
||||
ASSERT(
|
||||
false, "Unknown rpc error code {}", static_cast<int>(*clioCode)
|
||||
); // this should never happen
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user