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