daeError.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright 2006 Sony Computer Entertainment Inc.
  3. *
  4. * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this
  5. * file except in compliance with the License. You may obtain a copy of the License at:
  6. * http://research.scea.com/scea_shared_source_license.html
  7. *
  8. * Unless required by applicable law or agreed to in writing, software distributed under the License
  9. * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  10. * implied. See the License for the specific language governing permissions and limitations under the
  11. * License.
  12. */
  13. #ifndef __DAE__ERROR__
  14. #define __DAE__ERROR__
  15. #include <dae/daePlatform.h>
  16. /** Success */
  17. #define DAE_OK 0
  18. /** Fatal Error, should never be returned unless there is a bug in the library. */
  19. #define DAE_ERR_FATAL -1
  20. /** Call invalid, the combination of parameters given is invalid. */
  21. #define DAE_ERR_INVALID_CALL -2
  22. /** Generic error */
  23. #define DAE_ERROR -3
  24. /** IO error, the file hasn't been found or there is a problem with the IO plugin. */
  25. #define DAE_ERR_BACKEND_IO -100
  26. /** The IOPlugin backend wasn't able to successfully validate the data. */
  27. #define DAE_ERR_BACKEND_VALIDATION -101
  28. /** The IOPlugin tried to write to a file that already exists and the "replace" parameter was set to false */
  29. #define DAE_ERR_BACKEND_FILE_EXISTS -102
  30. /** Error in the syntax of the query. */
  31. #define DAE_ERR_QUERY_SYNTAX -200
  32. /** No match to the search criteria. */
  33. #define DAE_ERR_QUERY_NO_MATCH -201
  34. /** A document with that name already exists. */
  35. #define DAE_ERR_COLLECTION_ALREADY_EXISTS -202
  36. /** A document with that name does not exist. */
  37. #define DAE_ERR_COLLECTION_DOES_NOT_EXIST -203
  38. /** Function is not implemented. */
  39. #define DAE_ERR_NOT_IMPLEMENTED -1000
  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. #endif //__DAE__ERROR__