File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1194,9 +1194,15 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
1194
1194
1195
1195
// Load decryption keys
1196
1196
result = std::max (LoadDecryptionKeys (pwallet, *m_batch), result);
1197
- } catch (... ) {
1197
+ } catch (std::runtime_error& e ) {
1198
1198
// Exceptions that can be ignored or treated as non-critical are handled by the individual loading functions.
1199
1199
// Any uncaught exceptions will be caught here and treated as critical.
1200
+ // Catch std::runtime_error specifically as many functions throw these and they at least have some message that
1201
+ // we can log
1202
+ pwallet->WalletLogPrintf (" %s\n " , e.what ());
1203
+ result = DBErrors::CORRUPT;
1204
+ } catch (...) {
1205
+ // All other exceptions are still problematic, but we can't log them
1200
1206
result = DBErrors::CORRUPT;
1201
1207
}
1202
1208
You can’t perform that action at this time.
0 commit comments