Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | if (type == QtDebugMsg) { | ||||
LogPrintf("GUI: %s\n", msg.toStdString()); | LogPrintf("GUI: %s\n", msg.toStdString()); | ||||
} | } | ||||
} | } | ||||
BitcoinABC::BitcoinABC(interfaces::Node &node) : QObject(), m_node(node) {} | BitcoinABC::BitcoinABC(interfaces::Node &node) : QObject(), m_node(node) {} | ||||
void BitcoinABC::handleRunawayException(const std::exception *e) { | void BitcoinABC::handleRunawayException(const std::exception *e) { | ||||
PrintExceptionContinue(e, "Runaway exception"); | PrintExceptionContinue(e, "Runaway exception"); | ||||
Q_EMIT runawayException(QString::fromStdString(m_node.getWarnings())); | Q_EMIT runawayException( | ||||
QString::fromStdString(m_node.getWarnings().translated)); | |||||
} | } | ||||
void BitcoinABC::initialize(Config *config, RPCServer *rpcServer, | void BitcoinABC::initialize(Config *config, RPCServer *rpcServer, | ||||
HTTPRPCRequestProcessor *httpRPCRequestProcessor) { | HTTPRPCRequestProcessor *httpRPCRequestProcessor) { | ||||
try { | try { | ||||
qDebug() << __func__ << ": Running initialization in thread"; | qDebug() << __func__ << ": Running initialization in thread"; | ||||
util::ThreadRename("qt-init"); | util::ThreadRename("qt-init"); | ||||
bool rv = | bool rv = | ||||
▲ Show 20 Lines • Show All 621 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
app.exec(); | app.exec(); | ||||
app.requestShutdown(config); | app.requestShutdown(config); | ||||
app.exec(); | app.exec(); | ||||
return app.getReturnValue(); | return app.getReturnValue(); | ||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
PrintExceptionContinue(&e, "Runaway exception"); | PrintExceptionContinue(&e, "Runaway exception"); | ||||
app.handleRunawayException( | app.handleRunawayException( | ||||
QString::fromStdString(app.node().getWarnings())); | QString::fromStdString(app.node().getWarnings().translated)); | ||||
} catch (...) { | } catch (...) { | ||||
PrintExceptionContinue(nullptr, "Runaway exception"); | PrintExceptionContinue(nullptr, "Runaway exception"); | ||||
app.handleRunawayException( | app.handleRunawayException( | ||||
QString::fromStdString(app.node().getWarnings())); | QString::fromStdString(app.node().getWarnings().translated)); | ||||
} | } | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } |