- Cal3D 0.11 API Reference -

error.h
1 //****************************************************************************//
2 // error.h //
3 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger //
4 //****************************************************************************//
5 // This library is free software; you can redistribute it and/or modify it //
6 // under the terms of the GNU Lesser General Public License as published by //
7 // the Free Software Foundation; either version 2.1 of the License, or (at //
8 // your option) any later version. //
9 //****************************************************************************//
10 
11 #ifndef CAL_ERROR_H
12 #define CAL_ERROR_H
13 
14 #include "cal3d/global.h"
15 
16 
17 namespace CalError
18 {
19  enum Code
20  {
21  OK = 0,
22  INTERNAL,
23  INVALID_HANDLE,
24  MEMORY_ALLOCATION_FAILED,
25  FILE_NOT_FOUND,
26  INVALID_FILE_FORMAT,
27  FILE_PARSER_FAILED,
28  INDEX_BUILD_FAILED,
29  NO_PARSER_DOCUMENT,
30  INVALID_ANIMATION_DURATION,
31  BONE_NOT_FOUND,
32  INVALID_ATTRIBUTE_VALUE,
33  INVALID_KEYFRAME_COUNT,
34  INVALID_ANIMATION_TYPE,
35  FILE_CREATION_FAILED,
36  FILE_WRITING_FAILED,
37  INCOMPATIBLE_FILE_VERSION,
38  NO_MESH_IN_MODEL,
39  BAD_DATA_SOURCE,
40  NULL_BUFFER,
41  INVALID_MIXER_TYPE,
42  MAX_ERROR_CODE
43  };
44 
45  CAL3D_API Code getLastErrorCode();
46  CAL3D_API const std::string& getLastErrorFile();
47  CAL3D_API int getLastErrorLine();
48  CAL3D_API const std::string& getLastErrorText();
49  CAL3D_API void printLastError();
50  CAL3D_API void setLastError(Code code, const std::string& strFile, int line, const std::string& strText = "");
51 
52  CAL3D_API std::string getErrorDescription(Code code);
53 
54  inline std::string getLastErrorDescription() {
55  return getErrorDescription(getLastErrorCode());
56  }
57 }
58 
59 #endif

Generated at Thu Sep 4 2014 00:32:52 by The Cal3D Team with Doxygen 1.8.7