aboutsummaryrefslogtreecommitdiff
path: root/lib/base/eerror.h
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:35:43 +0000
committerFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:35:43 +0000
commitfc2f5b2cd655f1391f2abda1b39e37cdec98a951 (patch)
tree312efcea86a319de407a7c314fb981fb1c71019a /lib/base/eerror.h
downloadenigma2-fc2f5b2cd655f1391f2abda1b39e37cdec98a951.tar.gz
enigma2-fc2f5b2cd655f1391f2abda1b39e37cdec98a951.zip
Initial revision
Diffstat (limited to 'lib/base/eerror.h')
-rw-r--r--lib/base/eerror.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/base/eerror.h b/lib/base/eerror.h
new file mode 100644
index 00000000..bf913959
--- /dev/null
+++ b/lib/base/eerror.h
@@ -0,0 +1,43 @@
+#ifndef __E_ERROR__
+#define __E_ERROR__
+
+#include "config.h"
+#include <string>
+#include <map>
+#include <new>
+#include <libsig_comp.h>
+
+void eFatal(const char* fmt, ...);
+
+class eString;
+
+enum { lvlDebug=1, lvlWarning=2, lvlFatal=4 };
+
+extern Signal2<void, int, const eString&> logOutput;
+extern int logOutputConsole;
+
+#ifdef ASSERT
+#undef ASSERT
+#endif
+
+#ifdef DEBUG
+ void eDebug(const char* fmt, ...);
+ void eDebugNoNewLine(const char* fmt, ...);
+ void eWarning(const char* fmt, ...);
+ #define ASSERT(x) { if (!(x)) eFatal("%s:%d ASSERTION %s FAILED!", __FILE__, __LINE__, #x); }
+#else
+ inline void eDebug(const char* fmt, ...)
+ {
+ }
+
+ inline void eDebugNoNewLine(const char* fmt, ...)
+ {
+ }
+
+ inline void eWarning(const char* fmt, ...)
+ {
+ }
+ #define ASSERT(x) do { } while (0)
+#endif //DEBUG
+
+#endif // __E_ERROR__