Home | History | Annotate | Download | only in dae
      1 /*
      2 * Copyright 2006 Sony Computer Entertainment Inc.
      3 *
      4 * Licensed under the MIT Open Source License, for details please see license.txt or the website
      5 * http://www.opensource.org/licenses/mit-license.php
      6 *
      7 */
      8 
      9 #ifndef __DAE__ERROR__
     10 #define __DAE__ERROR__
     11 
     12 #include <dae/daePlatform.h>
     13 
     14 /** Success */
     15 #define DAE_OK 0
     16 /** Fatal Error, should never be returned unless there is a bug in the library. */
     17 #define DAE_ERR_FATAL -1
     18 /** Call invalid, the combination of parameters given is invalid. */
     19 #define DAE_ERR_INVALID_CALL -2
     20 /** Generic error */
     21 #define DAE_ERROR -3
     22 /** IO error, the file hasn't been found or there is a problem with the IO plugin. */
     23 #define DAE_ERR_BACKEND_IO -100
     24 /** The IOPlugin backend wasn't able to successfully validate the data. */
     25 #define DAE_ERR_BACKEND_VALIDATION -101
     26 /** The IOPlugin tried to write to a file that already exists and the "replace" parameter was set to false */
     27 #define DAE_ERR_BACKEND_FILE_EXISTS -102
     28 /** Error in the syntax of the query. */
     29 #define DAE_ERR_QUERY_SYNTAX -200
     30 /** No match to the search criteria. */
     31 #define DAE_ERR_QUERY_NO_MATCH -201
     32 /** A document with that name already exists. */
     33 #define DAE_ERR_COLLECTION_ALREADY_EXISTS -202
     34 /** A document with that name does not exist. */
     35 #define DAE_ERR_COLLECTION_DOES_NOT_EXIST -203
     36 /** Function is not implemented. */
     37 #define DAE_ERR_NOT_IMPLEMENTED -1000
     38 
     39 
     40 /** Gets the ASCII error string.
     41 * @param errorCode Error code returned by a function of the API.
     42 * @return Returns an English string describing the error.
     43 */
     44 DLLSPEC const char *daeErrorString(int errorCode);
     45 
     46 #endif //__DAE__ERROR__
     47