From: JINMEI Tatuya Date: Thu, 29 Nov 2012 21:29:02 +0000 (-0800) Subject: [2506] (unrelated) cleanup: define ReadError as a class, not a struct. X-Git-Tag: bind10-1.0.0-beta-release~46^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4b9c33282199c912e6f795f6bbfddde12510795;p=thirdparty%2Fkea.git [2506] (unrelated) cleanup: define ReadError as a class, not a struct. for consistency; it's awkward to see it as a struct while LexerError as a .class. The choice is basically a matter of taste, but I personally think it's better to be defined as a class as its base is defined as a class, and these exception structs are not just a trivial set of values. --- diff --git a/src/lib/dns/master_lexer.h b/src/lib/dns/master_lexer.h index 7a8a1d1593..fdc69fcfa3 100644 --- a/src/lib/dns/master_lexer.h +++ b/src/lib/dns/master_lexer.h @@ -301,7 +301,8 @@ class MasterLexer { public: /// \brief Exception thrown when we fail to read from the input /// stream or file. - struct ReadError : public Unexpected { + class ReadError : public Unexpected { + public: ReadError(const char* file, size_t line, const char* what) : Unexpected(file, line, what) {}