- Cal3D 0.11 API Reference -

error.h

00001 //****************************************************************************//
00002 // error.h                                                                    //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
00009 //****************************************************************************//
00010 
00011 #ifndef CAL_ERROR_H
00012 #define CAL_ERROR_H
00013 
00014 #include "cal3d/global.h"
00015 
00016 
00017 namespace CalError
00018 {
00019   enum Code
00020   {
00021     OK = 0,
00022     INTERNAL,
00023     INVALID_HANDLE,
00024     MEMORY_ALLOCATION_FAILED,
00025     FILE_NOT_FOUND,
00026     INVALID_FILE_FORMAT,
00027     FILE_PARSER_FAILED,
00028     INDEX_BUILD_FAILED,
00029     NO_PARSER_DOCUMENT,
00030     INVALID_ANIMATION_DURATION,
00031     BONE_NOT_FOUND,
00032     INVALID_ATTRIBUTE_VALUE,
00033     INVALID_KEYFRAME_COUNT,
00034     INVALID_ANIMATION_TYPE,
00035     FILE_CREATION_FAILED,
00036     FILE_WRITING_FAILED,
00037     INCOMPATIBLE_FILE_VERSION,
00038     NO_MESH_IN_MODEL,
00039     BAD_DATA_SOURCE,
00040     NULL_BUFFER,
00041     INVALID_MIXER_TYPE,
00042     MAX_ERROR_CODE
00043   };
00044 
00045   CAL3D_API Code getLastErrorCode();
00046   CAL3D_API const std::string& getLastErrorFile();
00047   CAL3D_API int getLastErrorLine();
00048   CAL3D_API const std::string& getLastErrorText();
00049   CAL3D_API void printLastError();
00050   CAL3D_API void setLastError(Code code, const std::string& strFile, int line, const std::string& strText = "");
00051 
00052   CAL3D_API std::string getErrorDescription(Code code);
00053 
00054   inline std::string getLastErrorDescription() {
00055       return getErrorDescription(getLastErrorCode());
00056   }
00057 }
00058 
00059 #endif

Generated at Thu Jun 29 19:03:59 2006 by The Cal3D Team with Doxygen 1.4.6