src/lib/errors.c
branchnew-lib-errors
changeset 219 cefec18b8268
parent 218 5229a5d098b2
--- a/src/lib/errors.c	Thu May 28 00:35:02 2009 +0300
+++ b/src/lib/errors.c	Thu May 28 01:17:36 2009 +0300
@@ -9,7 +9,12 @@
 );
 
 const struct error_list libc_errors = ERROR_LIST("libc",
-    ERROR_TYPE_ERRNO(   ERR_SIGACTION,          "sigaction"                         )
+    ERROR_TYPE_ERRNO(   ERR_SIGACTION,          "sigaction"                         ),
+    ERROR_TYPE_ERRNO(   ERR_READ,               "read"                              ),
+    ERROR_TYPE_ERRNO(   ERR_WRITE,              "write"                             ),
+    ERROR_TYPE_ERRNO(   ERR_WRITE_EOF,          "write: EOF"                        ),
+    ERROR_TYPE_ERRNO(   ERR_FCNTL,              "fcntl"                             ),
+    ERROR_TYPE_ERRNO(   ERR_CLOSE,              "close"                             )
 );
 
 const struct error_list libevent_errors = ERROR_LIST("libevent",
@@ -18,3 +23,10 @@
     ERROR_TYPE(         ERR_EVENT_DEL,          "event_del"                         )
 );
 
+const struct error_list lua_errors = ERROR_LIST("lua",
+    ERROR_TYPE_STRING(  ERR_LUA_MEM,            "memory error"                      ),
+    ERROR_TYPE_STRING(  ERR_LUA_SYNTAX,         "syntax error"                      ),
+    ERROR_TYPE_STRING(  ERR_LUA_RUN,            "runtime erorr"                     ),
+    ERROR_TYPE_STRING(  ERR_LUA_ERR,            "error-handling error"              ),
+    ERROR_TYPE_STRING(  ERR_LUA_FILE,           "filesystem error"                  )
+);