diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2015-03-03 21:17:06 +0100 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2015-03-03 21:17:06 +0100 |
commit | d3ed08616bdc4be62ab64332e0118090f1c6fce1 (patch) | |
tree | c3c5b37d2a688e3ec2c40fd590dc84f78b74b64f /src/pierror.h | |
parent | 76ed24fe8ae8c728de0d7d065918a5cd74fe7303 (diff) | |
download | luasocket-d3ed08616bdc4be62ab64332e0118090f1c6fce1.tar.gz luasocket-d3ed08616bdc4be62ab64332e0118090f1c6fce1.tar.bz2 luasocket-d3ed08616bdc4be62ab64332e0118090f1c6fce1.zip |
updated error messages, less error prone, platform independent
Diffstat (limited to 'src/pierror.h')
-rw-r--r-- | src/pierror.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/pierror.h b/src/pierror.h new file mode 100644 index 0000000..cb773ab --- /dev/null +++ b/src/pierror.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef PIERROR_H | ||
2 | #define PIERROR_H | ||
3 | /*=========================================================================*\ | ||
4 | * Error messages | ||
5 | * Defines platform independent error messages | ||
6 | \*=========================================================================*/ | ||
7 | |||
8 | #define PIE_HOST_NOT_FOUND "host not found" | ||
9 | #define PIE_ADDRINUSE "address already in use" | ||
10 | #define PIE_ISCONN "already connected" | ||
11 | #define PIE_ACCESS "permission denied" | ||
12 | #define PIE_CONNREFUSED "connection refused" | ||
13 | #define PIE_CONNABORTED "closed" | ||
14 | #define PIE_CONNRESET "closed" | ||
15 | #define PIE_TIMEDOUT "timeout" | ||
16 | #define PIE_AGAIN "temporary failure in name resolution" | ||
17 | #define PIE_BADFLAGS "invalid value for ai_flags" | ||
18 | #define PIE_BADHINTS "invalid value for hints" | ||
19 | #define PIE_FAIL "non-recoverable failure in name resolution" | ||
20 | #define PIE_FAMILY "ai_family not supported" | ||
21 | #define PIE_MEMORY "memory allocation failure" | ||
22 | #define PIE_NONAME "host or service not provided, or not known" | ||
23 | #define PIE_OVERFLOW "argument buffer overflow" | ||
24 | #define PIE_PROTOCOL "resolved protocol is unknown" | ||
25 | #define PIE_SERVICE "service not supported for socket type" | ||
26 | #define PIE_SOCKTYPE "ai_socktype not supported" | ||
27 | |||
28 | #endif | ||