1 /***************************************************************************/ 2 /* This code is part of WWW grabber called pavuk */ 3 /* Copyright (c) 1997 - 2001 Stefan Ondrejicka */ 4 /* Distributed under GPL 2 or later */ 5 /***************************************************************************/ 6 7 #ifndef _errcode_h_ 8 #define _errcode_h_ 9 10 #include "doc.h" 11 12 #define ERR_NOERROR 0 13 14 #define ERR_STORE_DOC 1 /*** error string document to local file ***/ 15 #define ERR_FILE_OPEN 2 /*** unable to open local file ***/ 16 #define ERR_DIR_URL 3 /*** FILE URL points to directory ***/ 17 #define ERR_UNKNOWN 5 18 #define ERR_LOCKED 6 /*** document is locked by another pavuk instance ***/ 19 #define ERR_READ 7 /*** error while reading from socket/file ***/ 20 #define ERR_BIGGER 8 /*** file is bigger than max. allowed ***/ 21 #define ERR_NOMIMET 9 /*** file MIME type is not allowed ***/ 22 #define ERR_PROXY_CONNECT 10 /*** error while connecting to proxy server ***/ 23 #define ERR_BREAK 11 /*** user break ***/ 24 #define ERR_OUTTIME 12 /*** file modification time doesn't fit in allowed time interval ***/ 25 #define ERR_SCRIPT_DISABLED 13 /*** disabled by uexit script ***/ 26 #define ERR_SMALLER 14 /*** file is smaller than minimal allowed ***/ 27 #define ERR_ZERO_SIZE 15 /*** if file have zero size ***/ 28 #define ERR_PROCESSED 16 /*** document was allready processed ***/ 29 #define ERR_UDISABLED 17 /*** user disables manualy the processing of this URL ***/ 30 #define ERR_RDISABLED 18 /*** this document is disabled because of rules ***/ 31 #define ERR_LOW_TRANSFER_RATE 19 /*** transfer rate lower than minimal requested ***/ 32 #define ERR_QUOTA_FILE 20 /*** rich maximal allowed size of file ***/ 33 #define ERR_QUOTA_TRANS 21 /*** quota for transfer exceeded ***/ 34 #define ERR_QUOTA_FS 22 /*** low space on filesystem ***/ 35 #define ERR_QUOTA_TIME 23 /*** maximal allowed running time exceeded ***/ 36 37 #define ERR_FTP_UNKNOWN 1000 /*** unknown error ***/ 38 #define ERR_FTP_NOREGET 1001 /*** server doesm't support reget ***/ 39 #define ERR_FTP_BDIR 1002 /*** directory list error ***/ 40 #define ERR_FTP_CONNECT 1003 /*** error conecting ***/ 41 #define ERR_FTP_BUSER 1004 /*** USER error ***/ 42 #define ERR_FTP_BPASS 1005 /*** PASS error ***/ 43 #define ERR_FTP_DATACON 1006 /*** error seting up data connection ***/ 44 #define ERR_FTP_GET 1007 /*** error when trying to transfer file or dir ***/ 45 #define ERR_FTP_NODIR 1008 /*** directory doesn't exist or is not accesible ***/ 46 #define ERR_FTP_TRUNC 1009 /*** truncated file ?? ***/ 47 #define ERR_FTP_ACTUAL 1010 /*** ftp file is actual (no transfer) ***/ 48 #define ERR_FTP_NOTRANSFER 1011 /*** nothing to transfer ***/ 49 #define ERR_FTP_NOMDTM 1012 /*** server doesn't suport MDTM command ***/ 50 #define ERR_FTP_DIRNO 1013 /*** directory , but not allowed ***/ 51 #define ERR_FTP_BPROXYUSER 1014 /*** proxy USER error ***/ 52 #define ERR_FTP_BPROXYPASS 1015 /*** proxy PASS error ***/ 53 #define ERR_FTP_LOGIN_HANDSHAKE 1016 /*** failed custom login handshake ***/ 54 55 #define ERR_HTTP_UNKNOWN 2000 /*** unknown error ***/ 56 #define ERR_HTTP_CONNECT 2001 /*** connection error ***/ 57 #define ERR_HTTP_NOREGET 2002 /*** reget not supported ***/ 58 #define ERR_HTTP_SNDREQ 2003 /*** error sending request ***/ 59 #define ERR_HTTP_REDIR 2004 /*** redirect ***/ 60 #define ERR_HTTP_TRUNC 2005 /*** truncated ***/ 61 #define ERR_HTTP_CYCLIC 2006 /*** cyclic redirection ***/ 62 #define ERR_HTTP_UNSUPREDIR 2007 /*** unsupported URL in redirection ***/ 63 #define ERR_HTTP_SNDREQDATA 2008 /*** error sending request data ***/ 64 #define ERR_HTTP_PROXY_CONN 2009 /*** error connecting to HTTP proxy ***/ 65 #define ERR_HTTP_BADREDIRECT 2010 /*** after redirect Loacation: is missing ***/ 66 #define ERR_HTTP_AUTH_NTLM 2011 /*** error doing NTLM authorization ***/ 67 #define ERR_HTTP_AUTH_DIGEST 2012 /*** error doing HTTP Digest authorization ***/ 68 #define ERR_HTTP_PROAUTH_NTLM 2013 /*** error doing NTLM proxy authorization ***/ 69 #define ERR_HTTP_PROAUTH_DIGEST 2014 /*** error doing HTTP proxy Digest authorization ***/ 70 #define ERR_HTTP_CLOSURE 2015 /*** persistent connection was closed ***/ 71 #define ERR_HTTP_RCVRESP 2016 /*** error reading response ***/ 72 #define ERR_HTTP_FAILREGET 2017 /*** bad answer on reget request ***/ 73 #define ERR_HTTP_ACTUAL 2304 /*** not modified ***/ 74 #define ERR_HTTP_USE_PROXY 2305 /*** Use Proxy ***/ 75 #define ERR_HTTP_306 2306 /*** 306 Unsupported by HTTP/1.1 ***/ 76 #define ERR_HTTP_REDIR2 2307 /*** Temporary Redirect ***/ 77 #define ERR_HTTP_BADRQ 2400 /*** bad request ***/ 78 #define ERR_HTTP_AUTH 2401 /*** authorization error ***/ 79 #define ERR_HTTP_PAY 2402 /*** payment required ***/ 80 #define ERR_HTTP_FORB 2403 /*** forbiden request ***/ 81 #define ERR_HTTP_NFOUND 2404 /*** not found ***/ 82 #define ERR_HTTP_NALLOW 2405 /*** Method Not Allowed ***/ 83 #define ERR_HTTP_NACCEPT 2406 /*** Not Acceptable ***/ 84 #define ERR_HTTP_PROXY_AUTH 2407 /*** proxy authorization error ***/ 85 #define ERR_HTTP_TIMEOUT 2408 /*** HTTP connection timeout ***/ 86 #define ERR_HTTP_CONFLICT 2409 /*** conflict ***/ 87 #define ERR_HTTP_GONE 2410 /*** gone ***/ 88 #define ERR_HTTP_MISSLEN 2411 /*** Length Required ***/ 89 #define ERR_HTTP_PREC_FAIL 2412 /*** Precondition Failed ***/ 90 #define ERR_HTTP_TOO_LARGE 2413 /*** Request Entity Too Large ***/ 91 #define ERR_HTTP_LONG_URL 2414 /*** Request-URI Too Long ***/ 92 #define ERR_HTTP_UNSUP_MEDIA 2415 /*** unsupported media type ***/ 93 #define ERR_HTTP_BAD_RANGE 2416 /*** Requested Range Not Satisfiable ***/ 94 #define ERR_HTTP_EXPECT_FAIL 2417 /*** Expectation Failed ***/ 95 #define ERR_HTTP_SERV 2500 /*** server error ***/ 96 #define ERR_HTTP_NOT_IMPL 2501 /*** not implemented ***/ 97 #define ERR_HTTP_BAD_GW 2502 /*** Bad Gateway ***/ 98 #define ERR_HTTP_SERV_UNAVAIL 2503 /*** Service Unavailable ***/ 99 #define ERR_HTTP_GW_TIMEOUT 2504 /*** Gateway Timeout ***/ 100 #define ERR_HTTP_VER_UNSUP 2505 /*** HTTP Version Not Supported ***/ 101 102 #define ERR_GOPHER_UNKNOWN 3000 /*** unknown error ***/ 103 #define ERR_GOPHER_CONNECT 3001 /*** error connecting ***/ 104 105 #define ERR_HTTPS_CONNECT 4001 /*** error connecting to HTTPS server ***/ 106 107 #define ERR_FTPS_CONNECT 5001 108 #define ERR_FTPS_UNSUPORTED 5002 109 #define ERR_FTPS_DATASSLCONNECT 5003 110 111 extern void report_error(doc *, char *); 112 113 #endif 114