diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-12-07 13:29:06 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-12-17 09:39:24 +0100 |
commit | 27df4123c433e5ad4e5592f0a8fbc40ca933865b (patch) | |
tree | 90ca518364768b73da454b6f782130e13fd48ef3 /src/init.cpp | |
parent | 851dfc7f88d1b7c42534fffcfbdb2f1bcc473045 (diff) |
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
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index 11329c16aa..63199b3206 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -778,7 +778,7 @@ bool AppInit2(boost::thread_group& threadGroup) try { boost::filesystem::rename(pathDatabase, pathDatabaseBak); LogPrintf("Moved old %s to %s. Retrying.\n", pathDatabase.string(), pathDatabaseBak.string()); - } catch(boost::filesystem::filesystem_error &error) { + } catch (const boost::filesystem::filesystem_error&) { // failure is ok (well, not really, but it's not worse than what we started with) } @@ -931,7 +931,7 @@ bool AppInit2(boost::thread_group& threadGroup) filesystem::create_hard_link(source, dest); LogPrintf("Hardlinked %s -> %s\n", source.string(), dest.string()); linked = true; - } catch (filesystem::filesystem_error & e) { + } catch (const filesystem::filesystem_error& e) { // Note: hardlink creation failing is not a disaster, it just means // blocks will get re-downloaded from peers. LogPrintf("Error hardlinking blk%04u.dat : %s\n", i, e.what()); @@ -1008,7 +1008,7 @@ bool AppInit2(boost::thread_group& threadGroup) strLoadError = _("Corrupted block database detected"); break; } - } catch(std::exception &e) { + } catch (const std::exception& e) { if (fDebug) LogPrintf("%s\n", e.what()); strLoadError = _("Error opening block database"); break; |