diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-09-10 02:02:35 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2014-01-29 17:39:24 +0000 |
commit | c117d9e93a712c3f1e2001bdb6e20e7a1c5e339b (patch) | |
tree | 6ca4799f9a007e83bac14b57cd391946e4264d9a /src/main.h | |
parent | 14e7ffcc641b3beef346024579e5d18f059eb374 (diff) |
Support for error messages and a few more rejection reasons
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 60e733b23a..6d43118832 100644 --- a/src/main.h +++ b/src/main.h @@ -950,13 +950,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() { return mode == MODE_VALID; |