00001 // /// // 00002 // ///// //// 00003 // /// XXX XXX /// 00004 // /// XXX XXX /// $RCSfile: mxcpc_exceptions.h,v $ 00005 // /// XXX /// $Revision: 1.3 $ 00006 // /// XXX XXX /// $Date: 2005/08/09 13:57:26 $ 00007 // //// XXX XXX //// $Author: cvs-steve $ 00008 // //// //// 00009 // //// M O B O T I X //////////////////////////////////////////////// 00010 // //// Security Vision Systems /////////////////////////////////////////////// 00011 00012 // /// // 00013 // ///// //// 00014 // /// XXX XXX /// 00015 // /// XXX XXX /// $RCSfile: mxcpc_exceptions.h,v $ 00016 // /// XXX /// $Revision: 1.3 $ 00017 // /// XXX XXX /// $Date: 2005/08/09 13:57:26 $ 00018 // //// XXX XXX //// $Author: cvs-steve $ 00019 // //// //// 00020 // //// M O B O T I X //////////////////////////////////////////////// 00021 // //// Security Vision Systems /////////////////////////////////////////////// 00022 00023 // Copyright (c) 2005, MOBOTIX AG. 00024 // This software is made available under the BSD licence. Please refer 00025 // to the file LICENCE.TXT contained in this distribution for details. 00026 00027 00028 #ifndef __MXCPC_EXCEPTIONS_H__ 00029 #define __MXCPC_EXCEPTIONS_H__ 00030 00031 00032 00033 #define MXCPC_RETHROW_UNHANDLED_EXCEPTION(e) \ 00034 if( !dynamic_cast<std::bad_alloc *>(&e) \ 00035 && !dynamic_cast<mxcpcException *>(&e)) throw 00036 00037 00038 00039 #include <exception> 00040 #include <memory> 00041 00042 00043 00045 00061 class mxcpcException : public std::exception {}; 00062 00063 00065 00068 class mxcpcDidntWorkOutException : public mxcpcException {}; 00069 00070 00072 00075 class mxcpcIOFailure : public mxcpcException {}; 00076 00077 00079 00082 class mxcpcWrongImput : public mxcpcException {}; 00083 00084 00087 00093 class mxcpcDatastructureIntegrityViolation : public mxcpcException {}; 00094 00095 00096 00097 #endif // __MXCPC_EXCEPTIONS_H__