diff options
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h index ba353a885b..bbf6fce48b 100644 --- a/src/main.h +++ b/src/main.h @@ -952,13 +952,15 @@ public: unsigned char _chRejectCode=0, std::string _strRejectReason="") { return DoS(0, ret, _chRejectCode, _strRejectReason); } - bool Error() { + bool Error(std::string strRejectReasonIn="") { + if (mode == MODE_VALID) + strRejectReason = strRejectReasonIn; mode = MODE_ERROR; return false; } bool Abort(const std::string &msg) { AbortNode(msg); - return Error(); + return Error(msg); } bool IsValid() const { return mode == MODE_VALID; |