1 /* 2 * Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org> 3 * 4 * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 * 6 * NetSurf is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; version 2 of the License. 9 * 10 * NetSurf 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. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 /** \file 20 * Error codes 21 */ 22 23 #ifndef NETSURF_UTILS_ERRORS_H_ 24 #define NETSURF_UTILS_ERRORS_H_ 25 26 /** 27 * Enumeration of error codes 28 */ 29 typedef enum { 30 NSERROR_OK, /**< No error */ 31 NSERROR_UNKNOWN, /**< Unknown error - DO *NOT* USE */ 32 NSERROR_NOMEM, /**< Memory exhaustion */ 33 NSERROR_NO_FETCH_HANDLER, /**< No fetch handler for URL scheme */ 34 NSERROR_NOT_FOUND, /**< Requested item not found */ 35 NSERROR_NOT_DIRECTORY, /**< Missing directory */ 36 NSERROR_SAVE_FAILED, /**< Failed to save data */ 37 NSERROR_CLONE_FAILED, /**< Failed to clone handle */ 38 NSERROR_INIT_FAILED, /**< Initialisation failed */ 39 NSERROR_BMP_ERROR, /**< A BMP error occurred */ 40 NSERROR_GIF_ERROR, /**< A GIF error occurred */ 41 NSERROR_ICO_ERROR, /**< A ICO error occurred */ 42 NSERROR_PNG_ERROR, /**< A PNG error occurred */ 43 NSERROR_SPRITE_ERROR, /**< A RISC OS Sprite error occurred */ 44 NSERROR_SVG_ERROR, /**< A SVG error occurred */ 45 NSERROR_BAD_ENCODING, /**< The character set is unknown */ 46 NSERROR_NEED_DATA, /**< More data needed */ 47 NSERROR_ENCODING_CHANGE, /**< The character changed */ 48 NSERROR_BAD_PARAMETER, /**< Bad Parameter */ 49 NSERROR_INVALID, /**< Invalid data */ 50 NSERROR_BOX_CONVERT, /**< Box conversion failed */ 51 NSERROR_STOPPED, /**< Content conversion stopped */ 52 NSERROR_DOM, /**< DOM call returned error */ 53 NSERROR_CSS, /**< CSS call returned error */ 54 NSERROR_CSS_BASE, /**< CSS base sheet failed */ 55 NSERROR_BAD_URL, /**< Bad URL */ 56 NSERROR_BAD_CONTENT, /**< Bad Content */ 57 NSERROR_FRAME_DEPTH, /**< Exceeded frame depth */ 58 NSERROR_PERMISSION, /**< Permission error */ 59 NSERROR_NOSPACE, /**< Insufficient space */ 60 NSERROR_BAD_SIZE, /**< Bad size */ 61 NSERROR_NOT_IMPLEMENTED, /**< Functionality is not implemented */ 62 NSERROR_BAD_REDIRECT, /**< Fetch encountered a bad redirect */ 63 NSERROR_BAD_AUTH, /**< Fetch needs authentication data */ 64 NSERROR_BAD_CERTS, /**< Fetch needs certificate chain check */ 65 NSERROR_TIMEOUT, /**< Operation timed out */ 66 } nserror; 67 68 #endif 69 70