eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // CoreException.h Core.Component package 00003 //============================================================================ 00004 // Usage : base exception class 00005 //---------------------------------------------------------------------------- 00006 // Copyright (C) 2006 by eLynx project 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // Library General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU Library General Public 00019 // License along with this library; if not, write to the Free 00020 // Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00021 //---------------------------------------------------------------------------- 00022 #ifndef __CoreException_h__ 00023 #define __CoreException_h__ 00024 00025 #include "CoreLib.h" 00026 #include "CoreTypes.h" 00027 #include "CoreErrorIds.h" 00028 00029 namespace eLynx { 00030 00032 #define elxExWhereLength 60 00033 00035 #define elxExWhatLength 200 00036 00037 00043 struct ExportedByCore elxException 00044 { 00045 uint32 _id; 00046 char _where[elxExWhereLength+1]; 00047 char _what[elxExWhatLength+1]; 00048 }; 00049 00057 ExportedByCore void elxThrowException( 00058 uint32 iId, 00059 const char * iFile, 00060 int32 iLine, 00061 const char * iMsg); 00062 00068 ExportedByCore const char* elxMsgFormat(const char *iFormatStr, ...); 00069 00070 00079 #define elxThrow(iId, iMsg) \ 00080 elxThrowException(iId, __FILE__, __LINE__, iMsg) 00081 00082 } // namespace eLynx 00083 00084 #endif // __CoreException_h__