error debugger

shows the list of errors that happened during running the game, traces
can be analyzed
This commit is contained in:
Juan Linietsky
2015-08-04 09:47:32 -03:00
parent cbee679bd7
commit d1da2c2995
7 changed files with 307 additions and 3 deletions

View File

@ -49,8 +49,31 @@ class ScriptDebuggerRemote : public ScriptDebugger {
Object *performance;
bool requested_quit;
Mutex *mutex;
struct OutputError {
int hr;
int min;
int sec;
int msec;
String source_file;
String source_func;
int source_line;
String error;
String error_descr;
bool warning;
Array callstack;
};
List<String> output_strings;
List<Message> messages;
List<OutputError> errors;
int max_cps;
int char_count;
uint64_t last_msec;
uint64_t msec_count;
bool locking; //hack to avoid a deadloop
static void _print_handler(void *p_this,const String& p_string);
@ -69,6 +92,10 @@ class ScriptDebuggerRemote : public ScriptDebugger {
LiveEditFuncs *live_edit_funcs;
ErrorHandlerList eh;
static void _err_handler(void*,const char*,const char*,int p_line,const char *, const char *,ErrorHandlerType p_type);
public:
Error connect_to_host(const String& p_host,uint16_t p_port);