aboutsummaryrefslogtreecommitdiff
path: root/src/monkey/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/monkey/error.c')
-rw-r--r--src/monkey/error.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/monkey/error.c b/src/monkey/error.c
new file mode 100644
index 000000000..adeb16c16
--- /dev/null
+++ b/src/monkey/error.c
@@ -0,0 +1,38 @@
1/**[txh]********************************************************************
2
3 Copyright (c) 2004 by Salvador E. Tropea.
4 Covered by the GPL license.
5
6 Module: Error.
7 Comment:
8 Translates error numbers into messages.
9
10***************************************************************************/
11
12#include "mi_gdb.h"
13
14static
15const char *error_strs[]=
16{
17 "Ok",
18 "Out of memory",
19 "Pipe creation",
20 "Fork failed",
21 "GDB not running",
22 "Parser failed",
23 "Unknown asyn response",
24 "Unknown result response",
25 "Error from gdb",
26 "Time out in gdb response",
27 "GDB suddenly died",
28 "Can't execute X terminal",
29 "Failed to create temporal",
30 "Can't execute the debugger"
31};
32
33const char *mi_get_error_str()
34{
35 if (mi_error<0 || mi_error>MI_LAST_ERROR)
36 return "Unknown";
37 return error_strs[mi_error];
38}