mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
merge bitcoin#19295: Use AbortError in FatalError
This commit is contained in:
parent
924b8fe34b
commit
7adf0c4757
@ -16,15 +16,13 @@ constexpr char DB_BEST_BLOCK = 'B';
|
||||
constexpr int64_t SYNC_LOG_INTERVAL = 30; // seconds
|
||||
constexpr int64_t SYNC_LOCATOR_WRITE_INTERVAL = 30; // seconds
|
||||
|
||||
template<typename... Args>
|
||||
template <typename... Args>
|
||||
static void FatalError(const char* fmt, const Args&... args)
|
||||
{
|
||||
std::string strMessage = tfm::format(fmt, args...);
|
||||
SetMiscWarning(strMessage);
|
||||
LogPrintf("*** %s\n", strMessage);
|
||||
uiInterface.ThreadSafeMessageBox(
|
||||
Untranslated("Error: A fatal internal error occurred, see debug.log for details"),
|
||||
"", CClientUIInterface::MSG_ERROR);
|
||||
AbortError(_("A fatal internal error occurred, see debug.log for details"));
|
||||
StartShutdown();
|
||||
}
|
||||
|
||||
|
@ -139,6 +139,7 @@ void InitWarning(const bilingual_str& str);
|
||||
|
||||
/** Show error message **/
|
||||
bool InitError(const bilingual_str& str);
|
||||
constexpr auto AbortError = InitError;
|
||||
|
||||
extern CClientUIInterface uiInterface;
|
||||
|
||||
|
@ -1573,8 +1573,6 @@ bool UndoReadFromDisk(CBlockUndo& blockundo, const CBlockIndex* pindex)
|
||||
return true;
|
||||
}
|
||||
|
||||
constexpr auto AbortError = InitError;
|
||||
|
||||
/** Abort with a message */
|
||||
static bool AbortNode(const std::string& strMessage, bilingual_str user_message = bilingual_str())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user