mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
make all catch() arguments const
- I saw this on http://en.cppreference.com/w/cpp/language/try_catch and thought it would be a good idea - also unify used format to better be able to search for exception uses in our codebase
This commit is contained in:
@@ -95,7 +95,7 @@ void FreespaceChecker::check()
|
||||
replyMessage = tr("Path already exists, and is not a directory.");
|
||||
}
|
||||
}
|
||||
} catch(fs::filesystem_error &e)
|
||||
} catch (const fs::filesystem_error&)
|
||||
{
|
||||
/* Parent directory does not exist or is not accessible */
|
||||
replyStatus = ST_ERROR;
|
||||
@@ -180,7 +180,7 @@ void Intro::pickDataDirectory()
|
||||
try {
|
||||
TryCreateDirectory(GUIUtil::qstringToBoostPath(dataDir));
|
||||
break;
|
||||
} catch(fs::filesystem_error &e) {
|
||||
} catch (const fs::filesystem_error&) {
|
||||
QMessageBox::critical(0, tr("Bitcoin Core"),
|
||||
tr("Error: Specified data directory \"%1\" cannot be created.").arg(dataDir));
|
||||
/* fall through, back to choosing screen */
|
||||
|
||||
Reference in New Issue
Block a user