Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.cpp
Show First 20 Lines • Show All 773 Lines • ▼ Show 20 Lines | if (pex) { | ||||
return strprintf("UNKNOWN EXCEPTION \n%s in %s \n", | return strprintf("UNKNOWN EXCEPTION \n%s in %s \n", | ||||
pszModule, pszThread); | pszModule, pszThread); | ||||
} | } | ||||
} | } | ||||
void PrintExceptionContinue(const std::exception *pex, const char *pszThread) { | void PrintExceptionContinue(const std::exception *pex, const char *pszThread) { | ||||
std::string message = FormatException(pex, pszThread); | std::string message = FormatException(pex, pszThread); | ||||
LogPrintf("\n\n************************\n%s\n", message); | LogPrintf("\n\n************************\n%s\n", message); | ||||
fprintf(stderr, "\n\n************************\n%s\n", message.c_str()); | tfm::format(std::cerr, "\n\n************************\n%s\n", | ||||
message.c_str()); | |||||
} | } | ||||
fs::path GetDefaultDataDir() { | fs::path GetDefaultDataDir() { | ||||
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Bitcoin | // Windows < Vista: C:\Documents and Settings\Username\Application Data\Bitcoin | ||||
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Bitcoin | // Windows >= Vista: C:\Users\Username\AppData\Roaming\Bitcoin | ||||
// Mac: ~/Library/Application Support/Bitcoin | // Mac: ~/Library/Application Support/Bitcoin | ||||
// Unix: ~/.bitcoin | // Unix: ~/.bitcoin | ||||
#ifdef WIN32 | #ifdef WIN32 | ||||
▲ Show 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | if (stream.good()) { | ||||
includeconf_net = GetArgs(std::string("-") + | includeconf_net = GetArgs(std::string("-") + | ||||
chain_id_final + ".includeconf"); | chain_id_final + ".includeconf"); | ||||
includeconf.insert(includeconf.end(), | includeconf.insert(includeconf.end(), | ||||
includeconf_net.begin(), | includeconf_net.begin(), | ||||
includeconf_net.end()); | includeconf_net.end()); | ||||
} | } | ||||
} | } | ||||
for (const std::string &to_include : includeconf) { | for (const std::string &to_include : includeconf) { | ||||
fprintf(stderr, | tfm::format( | ||||
std::cerr, | |||||
"warning: -includeconf cannot be used from included " | "warning: -includeconf cannot be used from included " | ||||
"files; ignoring -includeconf=%s\n", | "files; ignoring -includeconf=%s\n", | ||||
to_include.c_str()); | to_include.c_str()); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// If datadir is changed in .conf file: | // If datadir is changed in .conf file: | ||||
ClearDatadirCache(); | ClearDatadirCache(); | ||||
if (!fs::is_directory(GetDataDir(false))) { | if (!fs::is_directory(GetDataDir(false))) { | ||||
error = strprintf("specified data directory \"%s\" does not exist.", | error = strprintf("specified data directory \"%s\" does not exist.", | ||||
▲ Show 20 Lines • Show All 311 Lines • Show Last 20 Lines |