2013-08-02 16:12:24 -04:00
|
|
|
// Matt Wells, copyright Mar 2001
|
|
|
|
|
|
|
|
// . extensions of errno
|
|
|
|
// . have 16th bit set to avoid collisions with existing errnos
|
|
|
|
|
2016-03-08 16:14:30 -05:00
|
|
|
#ifndef GB_ERRNO_H
|
|
|
|
#define GB_ERRNO_H
|
2013-08-02 16:12:24 -04:00
|
|
|
|
2016-07-27 12:28:52 -04:00
|
|
|
// use thread specific g_errno
|
2016-07-27 19:31:00 -04:00
|
|
|
#define g_errno (*(g_errno_location()))
|
2016-07-27 12:28:52 -04:00
|
|
|
|
|
|
|
int* g_errno_location();
|
2013-08-02 16:12:24 -04:00
|
|
|
|
2016-07-04 05:20:34 -04:00
|
|
|
const char* mstrerror ( int errnum );
|
|
|
|
const char* merrname( int errnum );
|
2013-08-02 16:12:24 -04:00
|
|
|
|
2017-07-26 08:38:38 -04:00
|
|
|
bool isSpiderTempError(int errnum);
|
2017-10-23 10:40:41 -04:00
|
|
|
bool storeEmptyTitleRec(int errnum);
|
2017-07-26 08:38:38 -04:00
|
|
|
|
2016-07-04 05:20:34 -04:00
|
|
|
#define GB_ERRNO_BEGIN 0x00008000 // 32768
|
2013-08-02 16:12:24 -04:00
|
|
|
|
|
|
|
enum {
|
2016-07-04 05:20:34 -04:00
|
|
|
EUNUSED1 = GB_ERRNO_BEGIN, // 32768
|
2013-08-02 16:12:24 -04:00
|
|
|
ETRYAGAIN , // try doing it again
|
2016-07-04 05:20:34 -04:00
|
|
|
ECLOSING , // can't add cuz we're closing the db 32770
|
2013-08-02 16:12:24 -04:00
|
|
|
ENOTFOUND , // can't find in the db
|
|
|
|
EHOSTNAMETOOBIG , // hostname too big
|
|
|
|
EOUTOFSOCKETS , // no more sockets?
|
|
|
|
EURLTOOBIG , // too many chars in url
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED2 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EBADREPLYSIZE , // reply is wrong length
|
|
|
|
EBADREPLY , // something is wrong w/ reply
|
2013-12-09 16:42:33 -05:00
|
|
|
EREPLYTOOSMALL , // reply is too small 32778
|
2016-01-04 07:55:46 -05:00
|
|
|
EREQUESTTOOSHORT , // request length too short
|
2013-12-09 16:42:33 -05:00
|
|
|
EBADREQUESTSIZE , // request length not correct 32780
|
2013-08-02 16:12:24 -04:00
|
|
|
EBADREQUEST , // a bad request
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED3 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EBADHOSTID , // someone tried to use a bad hostId
|
|
|
|
EBADENGINEER , // me being lazy
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED4 ,
|
|
|
|
EUNUSED5 ,
|
|
|
|
EUNUSED6 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EBADRDBID , // bad rdb id
|
|
|
|
EBUFTOOSMALL , // used in SiteRec.cpp
|
2013-12-09 16:42:33 -05:00
|
|
|
ECOMPRESSFAILED , // used in TitleRec.cpp 32790
|
2013-08-02 16:12:24 -04:00
|
|
|
EUNCOMPRESSERROR , // used in TitleRec.cpp
|
|
|
|
EBADTITLEREC , // used in TitleRec.cpp
|
2016-06-29 10:32:04 -04:00
|
|
|
EUNUSED6A ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EBADLIST , // used in titledb/Msg23.cpp
|
|
|
|
ENODOCID , // used in titledb/Msg24.cpp
|
|
|
|
ENOHOSTS , // multicast can't find any hosts
|
|
|
|
ENOSLOTS , // multicast can't use more than X slots
|
2016-08-02 04:59:53 -04:00
|
|
|
EUNUSED52 ,
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED7 ,
|
2016-07-04 05:20:34 -04:00
|
|
|
EUNUSED8 , // 32800
|
2016-06-29 10:27:18 -04:00
|
|
|
EURLTOOLONG ,
|
|
|
|
EUNUSED9 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EDOCADULT , //parser/xml/XmlDoc.cpp
|
|
|
|
EDOCBANNED ,
|
|
|
|
EDOCFORCEDELETE , // doc force deleted
|
|
|
|
EDOCURLSPAM , // url detected as spam/porn
|
2017-07-03 10:52:25 -04:00
|
|
|
EDOCBLOCKEDURL ,
|
|
|
|
EDOCBLOCKEDDNS ,
|
2017-09-06 10:52:18 -04:00
|
|
|
EDOCBLOCKEDURLIP ,
|
2017-09-08 06:00:30 -04:00
|
|
|
EDOCBLOCKEDURLCORRUPT, // 32810
|
2013-08-02 16:12:24 -04:00
|
|
|
EDOCBADCONTENTTYPE ,
|
2017-09-26 16:24:42 -04:00
|
|
|
EDOCBLOCKEDURLINVALID,
|
2013-08-02 16:12:24 -04:00
|
|
|
EDOCBADHTTPSTATUS ,
|
|
|
|
EDOCREDIRECTSTOSELF ,
|
|
|
|
EDOCTOOMANYREDIRECTS ,
|
|
|
|
EDOCSIMPLIFIEDREDIR ,
|
2016-06-29 10:27:18 -04:00
|
|
|
EDOCBADREDIRECTURL ,
|
2017-11-08 09:36:22 -05:00
|
|
|
EDOCCONVERTFAILED ,
|
2017-11-19 16:32:19 -05:00
|
|
|
EDOCTOOBIG ,
|
2018-02-05 09:23:04 -05:00
|
|
|
EDOCBLOCKEDIP , // 32820
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED18 ,
|
|
|
|
EUNUSED19 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EDOCUNCHANGED ,
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED20 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EDOCDUP ,
|
2016-06-29 10:27:18 -04:00
|
|
|
EDOCDUPWWW ,
|
|
|
|
EUNUSED21 ,
|
2017-08-15 04:41:12 -04:00
|
|
|
EDOCDISALLOWED , // robots.txt disallows this url
|
|
|
|
EDOCDISALLOWEDHTTPSTATUS, // disallowed due to robots.txt http status
|
|
|
|
EDOCDISALLOWEDROOT, // robots.txt disallows this root url 32830
|
2017-11-20 08:04:29 -05:00
|
|
|
EDOCDISALLOWEDERROR, // disallowed due to error downloading robots.txt
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED25 ,
|
|
|
|
EUNUSED26 ,
|
|
|
|
EUNUSED27 ,
|
|
|
|
EUNUSED28 ,
|
|
|
|
EUNUSED29 ,
|
|
|
|
EUNUSED30 ,
|
|
|
|
EUNUSED31 ,
|
|
|
|
EUNUSED32 ,
|
2016-07-04 05:20:34 -04:00
|
|
|
EUNUSED33 , // 32840
|
2013-08-02 16:12:24 -04:00
|
|
|
ETOOMANYFILES , //used by Rdb class when trying to dump
|
|
|
|
EQUERYTOOBIG , //used by parser/query/SimpleQuery.cpp
|
|
|
|
EQUERYTRUNCATED , //used in Msg39.cpp
|
2016-06-29 10:34:46 -04:00
|
|
|
EUNUSED33A ,
|
2013-08-02 16:12:24 -04:00
|
|
|
ENOTLOCAL , //docId is not local (titledb/Msg20.cpp)
|
|
|
|
ETCPTIMEDOUT , //op timed out TcpServer.cpp
|
|
|
|
EUDPTIMEDOUT , //udp reply timed out
|
|
|
|
ESOCKETCLOSED , //device disconnected (POLL_HUP) Loop.cpp
|
2016-03-31 09:54:58 -04:00
|
|
|
EBADMIME , //HttpMime.cpp
|
2016-07-04 05:20:34 -04:00
|
|
|
ENOHOSTSFILE , //Hostdb::init() needs a hosts file 32850
|
2017-07-18 05:03:03 -04:00
|
|
|
EDNSNOTFOUND ,
|
|
|
|
EDNSSERVFAIL ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EBADIP , //parser/url/Url2.cpp::hashIp()
|
|
|
|
EMSGTOOBIG , //msg is too big
|
|
|
|
EDNSBAD , //dns sent us a wierd response code
|
|
|
|
EDNSREFUSED , //dns refused to talk to us
|
|
|
|
EDNSDEAD , //dns is dead
|
|
|
|
EDNSTIMEDOUT , //was just EUDPTIMEDOUT
|
2014-11-17 21:24:38 -05:00
|
|
|
ECOLLTOOBIG , //collection is too long
|
2017-07-18 05:03:03 -04:00
|
|
|
EDNSBADREQUEST , // 32860
|
2013-08-02 16:12:24 -04:00
|
|
|
ENOPERM , //permission denied
|
|
|
|
ECORRUPTDATA , //corrupt data
|
|
|
|
ENOCOLLREC , //no collection record
|
|
|
|
ESHUTTINGDOWN , //shutting down the server
|
|
|
|
EHOSTDEAD , // host is dead
|
|
|
|
EBADFILE , //file is bad
|
2017-07-18 05:03:03 -04:00
|
|
|
EDNSBADRESPONSE ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EFILECLOSED , //read on closed file?
|
|
|
|
ELISTTOOBIG , //Rdb::addList() calls this
|
2016-07-04 05:20:34 -04:00
|
|
|
ECANCELLED , //transaction was cancelled 32870
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED36 ,
|
|
|
|
EUNUSED37 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EBADCHARSET , // Unsupported charset
|
|
|
|
ETOOMANYDOWNLOADS, //too many concurrent http downloads
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED38 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
ELINKLOOP , //url is repeating path components in a loop
|
|
|
|
ENOCACHE , // document disallows caching
|
|
|
|
EREPAIRING , // we are in repair mode, cannot add data
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED39 ,
|
2016-07-04 05:20:34 -04:00
|
|
|
EBADURL , // 32880
|
2013-08-02 16:12:24 -04:00
|
|
|
EDOCFILTERED , // doc is filtered
|
|
|
|
ESSLNOTREADY , // SSl tcpserver is not ready to do HTTPS request
|
|
|
|
ERESTRICTEDPAGE , // spider trying to download /master or /admin page
|
|
|
|
EDOCISERRPG , // Doc is error page
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED40 ,
|
2015-03-04 13:49:37 -05:00
|
|
|
EINJECTIONSDISABLED , // injection is disabled
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED41 ,
|
2016-07-14 06:34:36 -04:00
|
|
|
EUNUSED41A ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EDOCREPEATSPAMMER,
|
2016-07-04 05:20:34 -04:00
|
|
|
EUNUSED42 , // 32890
|
2013-08-02 16:12:24 -04:00
|
|
|
EDOCBADSECTIONS ,
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED43 ,
|
|
|
|
EUNUSED44 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EBUFOVERFLOW ,
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED45 ,
|
|
|
|
EUNUSED46 ,
|
2013-08-02 16:12:24 -04:00
|
|
|
EABANDONED ,
|
|
|
|
ECORRUPTHTTPGZIP ,
|
|
|
|
EDOCIDCOLLISION ,
|
2016-07-04 05:20:34 -04:00
|
|
|
ESSLERROR , // 32900
|
2013-08-02 16:12:24 -04:00
|
|
|
EPERMDENIED ,
|
2017-12-16 05:54:13 -05:00
|
|
|
ENOLINKTEXT_AREATAG,
|
2016-06-29 10:48:50 -04:00
|
|
|
EUNUSED47A ,
|
|
|
|
EUNUSED47B ,
|
|
|
|
EUNUSED47C ,
|
2016-06-29 10:54:18 -04:00
|
|
|
EUNUSED47D ,
|
2016-06-29 10:55:49 -04:00
|
|
|
EUNUSED47E ,
|
2013-11-15 14:30:16 -05:00
|
|
|
EINTERNALERROR,
|
2013-12-20 15:22:02 -05:00
|
|
|
EBADJSONPARSER,
|
2016-07-04 05:20:34 -04:00
|
|
|
EFAKEFIRSTIP, // 32910
|
2014-01-10 17:12:58 -05:00
|
|
|
EBADHOSTSCONF,
|
2014-01-30 13:04:09 -05:00
|
|
|
EWAITINGTOSYNCHOSTSCONF,
|
2014-03-11 19:21:58 -04:00
|
|
|
EDOCNONCANONICAL,
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED48,
|
2016-07-21 17:19:06 -04:00
|
|
|
EUNUSED48A,
|
2014-05-15 17:11:12 -04:00
|
|
|
EBADIMG,
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED49,
|
2014-07-01 12:43:52 -04:00
|
|
|
ETOOMANYPARENS,
|
2016-06-29 10:48:50 -04:00
|
|
|
EUNUSED49A,
|
2016-07-04 05:20:34 -04:00
|
|
|
EUNUSED49B, // 32920
|
2016-06-29 10:48:50 -04:00
|
|
|
EUNUSED49C,
|
|
|
|
EUNUSED49D,
|
|
|
|
EUNUSED49E,
|
|
|
|
EUNUSED49F,
|
|
|
|
EUNUSED49G,
|
|
|
|
EUNUSED49H,
|
|
|
|
EUNUSED49I,
|
|
|
|
EUNUSED49J,
|
2014-07-06 01:20:15 -04:00
|
|
|
EMISSINGINPUT,
|
2016-07-04 05:20:34 -04:00
|
|
|
EPROXYSSLCONNECTFAILED, // 32930
|
2016-06-29 10:51:14 -04:00
|
|
|
EUNUSED49K,
|
2014-12-15 19:49:20 -05:00
|
|
|
EREADONLYMODE,
|
2015-03-04 13:49:37 -05:00
|
|
|
ENOTITLEREC,
|
2015-03-09 23:54:34 -04:00
|
|
|
EQUERYINGDISABLED,
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED50,
|
2015-05-21 17:19:33 -04:00
|
|
|
EADMININTERFERENCE,
|
2015-07-01 21:03:56 -04:00
|
|
|
EDNSERROR ,
|
2016-06-29 10:27:18 -04:00
|
|
|
EUNUSED51,
|
2015-09-11 15:43:49 -04:00
|
|
|
EMALFORMEDQUERY,
|
2016-09-26 08:47:49 -04:00
|
|
|
ESHARDDOWN, // 32940
|
|
|
|
ETITLEERROR,
|
2017-08-24 10:25:54 -04:00
|
|
|
EDOCBLOCKEDSHLIBDOMAIN,
|
|
|
|
EDOCBLOCKEDSHLIBURL,
|
2017-09-07 08:21:37 -04:00
|
|
|
EBANNEDCRAWL, // we are apparently banned/blacklisted by the Webserver/IDS/
|
2017-09-12 10:45:20 -04:00
|
|
|
EDOCBLOCKEDSHLIBCONTENT,
|
2017-09-19 09:11:32 -04:00
|
|
|
ENOFIRSTIPFOUND, //didn't find a firstip tag record for url/site
|
2013-08-02 16:12:24 -04:00
|
|
|
};
|
2016-03-08 16:14:30 -05:00
|
|
|
|
|
|
|
#endif // GB_ERRNO_H
|