git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
another new is to small
[enigma2.git]
/
lib
/
base
/
eerror.cpp
diff --git
a/lib/base/eerror.cpp
b/lib/base/eerror.cpp
index 0871bb715f78748cd4e823373d28cc1e0ac6c1cf..3239ddc54023450b96314c78d63031146573ab2a 100644
(file)
--- a/
lib/base/eerror.cpp
+++ b/
lib/base/eerror.cpp
@@
-4,11
+4,21
@@
#include <stdlib.h>
#include <unistd.h>
#include <stdlib.h>
#include <unistd.h>
-#include <lib/gui/emessage.h>
+#include <string>
+
+// #include <lib/gui/emessage.h>
+
+#ifdef MEMLEAK_CHECK
+AllocList *allocList;
+pthread_mutex_t memLock =
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+#else
+ #include <lib/base/elock.h>
+#endif
int infatal=0;
int infatal=0;
-Signal2<void, int, const
eS
tring&> logOutput;
+Signal2<void, int, const
std::s
tring&> logOutput;
int logOutputConsole=1;
void eFatal(const char* fmt, ...)
int logOutputConsole=1;
void eFatal(const char* fmt, ...)
@@
-19,7
+29,8
@@
void eFatal(const char* fmt, ...)
vsnprintf(buf, 1024, fmt, ap);
va_end(ap);
logOutput(lvlFatal, buf);
vsnprintf(buf, 1024, fmt, ap);
va_end(ap);
logOutput(lvlFatal, buf);
- fprintf(stderr, "%s\n",buf );
+ fprintf(stderr, "FATAL: %s\n",buf );
+#if 0
if (!infatal)
{
infatal=1;
if (!infatal)
{
infatal=1;
@@
-27,6
+38,8
@@
void eFatal(const char* fmt, ...)
msg.show();
msg.exec();
}
msg.show();
msg.exec();
}
+#endif
+
_exit(0);
}
_exit(0);
}
@@
-38,7
+51,7
@@
void eDebug(const char* fmt, ...)
va_start(ap, fmt);
vsnprintf(buf, 1024, fmt, ap);
va_end(ap);
va_start(ap, fmt);
vsnprintf(buf, 1024, fmt, ap);
va_end(ap);
- logOutput(lvlDebug,
eS
tring(buf) + "\n");
+ logOutput(lvlDebug,
std::s
tring(buf) + "\n");
if (logOutputConsole)
fprintf(stderr, "%s\n", buf);
}
if (logOutputConsole)
fprintf(stderr, "%s\n", buf);
}
@@
-62,8
+75,20
@@
void eWarning(const char* fmt, ...)
va_start(ap, fmt);
vsnprintf(buf, 1024, fmt, ap);
va_end(ap);
va_start(ap, fmt);
vsnprintf(buf, 1024, fmt, ap);
va_end(ap);
- logOutput(lvlWarning,
eS
tring(buf) + "\n");
+ logOutput(lvlWarning,
std::s
tring(buf) + "\n");
if (logOutputConsole)
fprintf(stderr, "%s\n", buf);
}
#endif // DEBUG
if (logOutputConsole)
fprintf(stderr, "%s\n", buf);
}
#endif // DEBUG
+
+void ePythonOutput(const char *string)
+{
+ logOutput(lvlWarning, string);
+ if (logOutputConsole)
+ fwrite(string, 1, strlen(string), stderr);
+}
+
+void eWriteCrashdump()
+{
+ /* implement me */
+}