#include "stdafx.h" void ILogFatalError(const char* sz) { wxLogFatalError(_wx("%s"), _wx(sz)); } // which is like wxLogError(), but also terminates the program with the exit code 3 (using abort() standard function).Unlike for all the other logging functions, this function can't be overridden by a log target. void ILogError(const char* sz) { wxLogError(_wx("%s"), _wx(sz)); } //is the function to use for error messages, i.e.the messages that must be shown to the user.The default processing is to pop up a message box to inform the user about it. void ILogWarning(const char* sz) { wxLogWarning(_wx("%s"), _wx(sz)); } //for warnings.They are also normally shown to the user, but don't interrupt the program work. void ILogMessage(const char* sz) { wxLogMessage(_wx("%s"), _wx(sz)); } // is for all normal, informational messages.*/ void ILogVerbose(const char* sz) { wxLogVerbose(_wx("%s"), _wx(sz)); } ; // is for verbose output.Normally, it is suppressed, but might be activated if the user wishes to know more details about the program progress(another, but possibly confusing name for the same function is wxLogInfo). void ILogDebug(const char* sz) { wxLogDebug(_wx("%s"), _wx(sz)); } //is the right function for debug output. It only does anything at all in the //debug mode(when the preprocessor symbol WXDEBUG is defined) and expands to //nothing in release mode(otherwise).Note that under Windows, you must either //run the program under debugger or use a 3rd party program such as DebugView void queue_error_message(const char* psz) { // Used where throwing immediately would be disastrous, as in a destructor. auto event = new wxCommandEvent(wxEVT_MENU, myID_ERRORMESSAGE); event->SetString(_wx(psz)); // wxQueueEvent(singletonFrame->GetMenuBar(), event); wxQueueEvent(singletonApp, event); } void queue_fatal_error(const char* psz) { // Used where throwing immediately would be disastrous, as in a destructor or when constructing the main frame if (!errorCode)errorCode = 10; queue_error_message(psz); singletonFrame->Close(); } MyException::MyException(const char* sz, int i, const char* func__, const char* FILE__) noexcept : // usage // throw MyException("Expected wallet file not found", __LINE__, __func__, __FILE__); err_number(i) { char buff[20]; snprintf(buff, 20, "%d", i); err = std::string(sz) + "\nline " + buff + ", function " + func__ + ", file " + FILE__; }