error_numbers.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. // This file is part of BOINC.
  2. // http://boinc.berkeley.edu
  3. // Copyright (C) 2008 University of California
  4. //
  5. // BOINC is free software; you can redistribute it and/or modify it
  6. // under the terms of the GNU Lesser General Public License
  7. // as published by the Free Software Foundation,
  8. // either version 3 of the License, or (at your option) any later version.
  9. //
  10. // BOINC is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. // See the GNU Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with BOINC. If not, see <http://www.gnu.org/licenses/>.
  17. #ifndef BOINC_ERROR_NUMBERS_H
  18. #define BOINC_ERROR_NUMBERS_H
  19. // The following are process exit codes (not function return values).
  20. // They are used by the core client and apps.
  21. // NOTE: Unix passes only 8 bits of exit code,
  22. // and Unix uses roughly 1-137, so let's start at 192
  23. #define EXIT_STATEFILE_WRITE 192
  24. // client exit when can't write statefile
  25. #define EXIT_SIGNAL 193
  26. // app was killed by signal
  27. #define EXIT_ABORTED_BY_CLIENT 194
  28. #define EXIT_CHILD_FAILED 195
  29. #define EXIT_DISK_LIMIT_EXCEEDED 196
  30. #define EXIT_TIME_LIMIT_EXCEEDED 197
  31. #define EXIT_MEM_LIMIT_EXCEEDED 198
  32. #define EXIT_CLIENT_EXITING 199
  33. #define EXIT_UNSTARTED_LATE 200
  34. #define EXIT_MISSING_COPROC 201
  35. #define EXIT_ABORTED_BY_PROJECT 202
  36. #define EXIT_ABORTED_VIA_GUI 203
  37. #define EXIT_UNKNOWN 204
  38. #define EXIT_OUT_OF_MEMORY 205
  39. #define EXIT_INIT_FAILURE 206
  40. #define EXIT_NO_SUB_TASKS 207
  41. #define EXIT_SUB_TASK_FAILURE 208
  42. // Function return values.
  43. // NOTE: add new errors to the end of the list and don't change
  44. // old error numbers to avoid confusion between versions.
  45. // Add a text description of your error to the text description
  46. // function boincerror() in str_util.cpp.
  47. //
  48. #define BOINC_SUCCESS 0
  49. #define ERR_SELECT -100
  50. #define ERR_MALLOC -101
  51. #define ERR_READ -102
  52. #define ERR_WRITE -103
  53. #define ERR_FREAD -104
  54. #define ERR_FWRITE -105
  55. #define ERR_IO -106
  56. #define ERR_CONNECT -107
  57. #define ERR_FOPEN -108
  58. #define ERR_RENAME -109
  59. #define ERR_UNLINK -110
  60. #define ERR_OPENDIR -111
  61. #define ERR_XML_PARSE -112
  62. // Unexpected XML tag or XML format
  63. #define ERR_GETHOSTBYNAME -113
  64. // Couldn't resolve hostname
  65. #define ERR_GIVEUP_DOWNLOAD -114
  66. // too much time has elapsed without progress on file xfer,
  67. // or we got a 404 (not found) status code from server
  68. #define ERR_GIVEUP_UPLOAD -115
  69. #define ERR_NULL -116
  70. // unexpected NULL pointer
  71. #define ERR_NEG -117
  72. // unexpected negative value
  73. #define ERR_BUFFER_OVERFLOW -118
  74. // caught buffer overflow
  75. #define ERR_MD5_FAILED -119
  76. // MD5 checksum failed for a file
  77. #define ERR_RSA_FAILED -120
  78. // RSA key check failed for a file
  79. #define ERR_OPEN -121
  80. #define ERR_DUP2 -122
  81. #define ERR_NO_SIGNATURE -123
  82. #define ERR_THREAD -124
  83. // Error creating a thread
  84. #define ERR_SIGNAL_CATCH -125
  85. #define ERR_BAD_FORMAT -126
  86. #define ERR_UPLOAD_TRANSIENT -127
  87. #define ERR_UPLOAD_PERMANENT -128
  88. #define ERR_IDLE_PERIOD -129
  89. // can't start work because of user prefs
  90. #define ERR_ALREADY_ATTACHED -130
  91. #define ERR_FILE_TOO_BIG -131
  92. // an output file was bigger than max_nbytes
  93. #define ERR_GETRUSAGE -132
  94. // getrusage failed
  95. #define ERR_BENCHMARK_FAILED -133
  96. #define ERR_BAD_HEX_FORMAT -134
  97. // hex-format key data is bad
  98. #define ERR_GETADDRINFO -135
  99. #define ERR_DB_NOT_FOUND -136
  100. // no rows found in lookup() or enumerate()
  101. #define ERR_DB_NOT_UNIQUE -137
  102. // not unique in lookup()
  103. #define ERR_DB_CANT_CONNECT -138
  104. #define ERR_GETS -139
  105. // gets() or fgets()
  106. #define ERR_SCANF -140
  107. // scanf() or fscanf()
  108. #define ERR_READDIR -143
  109. #define ERR_SHMGET -144
  110. #define ERR_SHMCTL -145
  111. #define ERR_SHMAT -146
  112. #define ERR_FORK -147
  113. #define ERR_EXEC -148
  114. #define ERR_NOT_EXITED -149
  115. // a process didn't exit that was supposed to
  116. #define ERR_NOT_IMPLEMENTED -150
  117. // a system call not implemented on this platform
  118. #define ERR_GETHOSTNAME -151
  119. #define ERR_NETOPEN -152
  120. #define ERR_SOCKET -153
  121. #define ERR_FCNTL -154
  122. #define ERR_AUTHENTICATOR -155
  123. // scheduler request host ID doesn't match authenticator
  124. #define ERR_SCHED_SHMEM -156
  125. // sched shmem has bad contents
  126. #define ERR_ASYNCSELECT -157
  127. #define ERR_BAD_RESULT_STATE -158
  128. #define ERR_DB_CANT_INIT -159
  129. #define ERR_NOT_UNIQUE -160
  130. // state files had redundant entries
  131. #define ERR_NOT_FOUND -161
  132. // catch-all lookup error
  133. #define ERR_NO_EXIT_STATUS -162
  134. // exit_status not found in scheduler request
  135. #define ERR_FILE_MISSING -163
  136. #define ERR_KILL -164
  137. #define ERR_SEMGET -165
  138. #define ERR_SEMCTL -166
  139. #define ERR_SEMOP -167
  140. #define ERR_FTOK -168
  141. #define ERR_SOCKS_UNKNOWN_FAILURE -169
  142. #define ERR_SOCKS_REQUEST_FAILED -170
  143. #define ERR_SOCKS_BAD_USER_PASS -171
  144. #define ERR_SOCKS_UNKNOWN_SERVER_VERSION -172
  145. #define ERR_SOCKS_UNSUPPORTED -173
  146. #define ERR_SOCKS_CANT_REACH_HOST -174
  147. #define ERR_SOCKS_CONN_REFUSED -175
  148. #define ERR_TIMER_INIT -176
  149. #define ERR_INVALID_PARAM -178
  150. #define ERR_SIGNAL_OP -179
  151. #define ERR_BIND -180
  152. #define ERR_LISTEN -181
  153. #define ERR_TIMEOUT -182
  154. #define ERR_PROJECT_DOWN -183
  155. #define ERR_HTTP_TRANSIENT -184
  156. // HTTP errors other than 404 and 416
  157. #define ERR_RESULT_START -185
  158. #define ERR_RESULT_DOWNLOAD -186
  159. #define ERR_RESULT_UPLOAD -187
  160. #define ERR_BAD_USER_NAME -188
  161. #define ERR_INVALID_URL -189
  162. #define ERR_MAJOR_VERSION -190
  163. #define ERR_NO_OPTION -191
  164. #define ERR_MKDIR -192
  165. #define ERR_INVALID_EVENT -193
  166. #define ERR_ALREADY_RUNNING -194
  167. #define ERR_NO_APP_VERSION -195
  168. #define ERR_WU_USER_RULE -196
  169. #define ERR_ABORTED_VIA_GUI -197
  170. #define ERR_INSUFFICIENT_RESOURCE -198
  171. #define ERR_RETRY -199
  172. #define ERR_WRONG_SIZE -200
  173. #define ERR_USER_PERMISSION -201
  174. // e.g. user didn't allow network connection
  175. #define ERR_SHMEM_NAME -202
  176. #define ERR_NO_NETWORK_CONNECTION -203
  177. #define ERR_IN_PROGRESS -204
  178. #define ERR_BAD_EMAIL_ADDR -205
  179. #define ERR_BAD_PASSWD -206
  180. #define ERR_NONUNIQUE_EMAIL -207
  181. #define ERR_ACCT_CREATION_DISABLED -208
  182. #define ERR_ATTACH_FAIL_INIT -209
  183. #define ERR_ATTACH_FAIL_DOWNLOAD -210
  184. #define ERR_ATTACH_FAIL_PARSE -211
  185. #define ERR_ATTACH_FAIL_BAD_KEY -212
  186. #define ERR_ATTACH_FAIL_FILE_WRITE -213
  187. #define ERR_ATTACH_FAIL_SERVER_ERROR -214
  188. #define ERR_SIGNING_KEY -215
  189. #define ERR_FFLUSH -216
  190. #define ERR_FSYNC -217
  191. #define ERR_TRUNCATE -218
  192. #define ERR_WRONG_URL -219
  193. #define ERR_DUP_NAME -220
  194. #define ERR_GETGRNAM -222
  195. #define ERR_CHOWN -223
  196. #define ERR_HTTP_PERMANENT -224
  197. // represents HTTP 404 or 416 error
  198. #define ERR_BAD_FILENAME -225
  199. #define ERR_TOO_MANY_EXITS -226
  200. #define ERR_RMDIR -227
  201. #define ERR_SYMLINK -229
  202. #define ERR_DB_CONN_LOST -230
  203. #define ERR_CRYPTO -231
  204. #define ERR_ABORTED_ON_EXIT -232
  205. #define ERR_PROC_PARSE -235
  206. #define ERR_STATFS -236
  207. #define ERR_PIPE -237
  208. #define ERR_NEED_HTTPS -238
  209. #define ERR_CHMOD -239
  210. #define ERR_STAT -240
  211. #define ERR_FCLOSE -241
  212. #define ERR_ACCT_REQUIRE_CONSENT -242
  213. #define ERR_INVALID_STATE -243
  214. // PLEASE: add a text description of your error to
  215. // the text description function boincerror() in str_util.cpp.
  216. // returns short text description of error corresponding to
  217. // int errornumber from error_numbers.h
  218. //
  219. extern const char* boincerror(int which_error);
  220. #endif