|
29 | 29 | #include <util/validation.h>
|
30 | 30 |
|
31 | 31 | #include <memory>
|
| 32 | +#include <typeinfo> |
32 | 33 |
|
33 | 34 | #if defined(NDEBUG)
|
34 | 35 | # error "Bitcoin cannot be compiled without assertions."
|
@@ -3333,32 +3334,10 @@ bool PeerLogicValidation::ProcessMessages(CNode* pfrom, std::atomic<bool>& inter
|
3333 | 3334 | return false;
|
3334 | 3335 | if (!pfrom->vRecvGetData.empty())
|
3335 | 3336 | fMoreWork = true;
|
3336 |
| - } |
3337 |
| - catch (const std::ios_base::failure& e) |
3338 |
| - { |
3339 |
| - if (strstr(e.what(), "end of data")) { |
3340 |
| - // Allow exceptions from under-length message on vRecv |
3341 |
| - LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); |
3342 |
| - } else if (strstr(e.what(), "size too large")) { |
3343 |
| - // Allow exceptions from over-long size |
3344 |
| - LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); |
3345 |
| - } else if (strstr(e.what(), "non-canonical ReadCompactSize()")) { |
3346 |
| - // Allow exceptions from non-canonical encoding |
3347 |
| - LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); |
3348 |
| - } else if (strstr(e.what(), "Superfluous witness record")) { |
3349 |
| - // Allow exceptions from illegal witness encoding |
3350 |
| - LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); |
3351 |
| - } else if (strstr(e.what(), "Unknown transaction optional data")) { |
3352 |
| - // Allow exceptions from unknown witness encoding |
3353 |
| - LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); |
3354 |
| - } else { |
3355 |
| - PrintExceptionContinue(&e, "ProcessMessages()"); |
3356 |
| - } |
3357 |
| - } |
3358 |
| - catch (const std::exception& e) { |
3359 |
| - PrintExceptionContinue(&e, "ProcessMessages()"); |
| 3337 | + } catch (const std::exception& e) { |
| 3338 | + LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' (%s) caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what(), typeid(e).name()); |
3360 | 3339 | } catch (...) {
|
3361 |
| - PrintExceptionContinue(nullptr, "ProcessMessages()"); |
| 3340 | + LogPrint(BCLog::NET, "%s(%s, %u bytes): Unknown exception caught\n", __func__, SanitizeString(strCommand), nMessageSize); |
3362 | 3341 | }
|
3363 | 3342 |
|
3364 | 3343 | if (!fRet) {
|
|
0 commit comments