From 080603148cbb37d396aa655e6cd986698b7e6f0f Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Sun, 6 Mar 2011 14:29:12 +0200 Subject: [PATCH] Document error message severities. --- lib/errorlogger.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/lib/errorlogger.h b/lib/errorlogger.h index 384562b54..b50cf5d72 100644 --- a/lib/errorlogger.h +++ b/lib/errorlogger.h @@ -35,7 +35,56 @@ class Tokenizer; class Severity { public: - enum SeverityType { none, error, warning, style, performance, portability, information, debug }; + /** + * Message severities. + */ + enum SeverityType + { + /** + * No severity (default value). + */ + none, + /** + * Programming error. + * This indicates severe error like memory leak etc. + */ + error, + /** + * Warning. + */ + warning, + /** + * Style warning. + */ + style, + /** + * Performance warning. + * Not an error as is but suboptimal code and fixing it probably leads + * to faster performance of the compiled code. + */ + performance, + /** + * Portability warning. + * This warning indicates the code is not properly portable for + * different platforms and bitnesses (32/64 bit). If the code is meant + * to compile in different platforms and bitnesses these warnings + * should be fixed. + */ + portability, + /** + * Checking information. + * Information message about the checking (process) itself. These + * messages inform about header files not found etc issues that are + * not errors in the code but something user needs to know. + */ + information, + /** + * Debug message. + * Debug-mode message useful for the developers. + */ + debug + }; + static std::string toString(SeverityType severity) { switch (severity)