aboutsummaryrefslogtreecommitdiff
path: root/lib/base/eerror.h
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
committerFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
commitd63d2c3c6cbbd574dda4f8b00ebe6c661735edd5 (patch)
tree84d0cacfd0b6c1241c236c7860f7cbd7f26901bb /lib/base/eerror.h
downloadenigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.tar.gz
enigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.zip
import of enigma2
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__