00001 #ifndef PSENV_EXCEPTIONS_H 00002 #define PSENV_EXCEPTIONS_H 00003 00004 //-------------------------------------------------------------------------- 00005 // File and Version Information: 00006 // $Id: Exceptions.h 1842 2011-05-07 01:50:01Z salnikov $ 00007 // 00008 // Description: 00009 // Class Exceptions. 00010 // 00011 //------------------------------------------------------------------------ 00012 00013 //----------------- 00014 // C/C++ Headers -- 00015 //----------------- 00016 00017 //---------------------- 00018 // Base Class Headers -- 00019 //---------------------- 00020 #include "ErrSvc/Issue.h" 00021 00022 //------------------------------- 00023 // Collaborating Class Headers -- 00024 //------------------------------- 00025 00026 //------------------------------------ 00027 // Collaborating Class Declarations -- 00028 //------------------------------------ 00029 00030 // --------------------- 00031 // -- Class Interface -- 00032 // --------------------- 00033 00034 namespace PSEnv { 00035 00036 /** 00037 * @brief Base class for all exception classes for PSEnv package. 00038 * 00039 * This software was developed for the LCLS project. If you use all or 00040 * part of it, please give an appropriate acknowledgment. 00041 * 00042 * @see AdditionalClass 00043 * 00044 * @version \$Id: Exceptions.h 1842 2011-05-07 01:50:01Z salnikov $ 00045 * 00046 * @author Andrei Salnikov 00047 */ 00048 00049 class Exception : public ErrSvc::Issue { 00050 public: 00051 00052 /// Constructor takes the reason for an exception 00053 Exception ( const ErrSvc::Context& ctx, const std::string& what ) ; 00054 00055 }; 00056 00057 /// Exception thrown for unknown EPICS PV name 00058 class ExceptionEpicsName : public Exception { 00059 public: 00060 00061 ExceptionEpicsName ( const ErrSvc::Context& ctx, 00062 const std::string& pvname ) ; 00063 00064 }; 00065 00066 /// Exception thrown for conversion errors for EPICS values 00067 class ExceptionEpicsConversion : public Exception { 00068 public: 00069 00070 ExceptionEpicsConversion ( const ErrSvc::Context& ctx, 00071 const std::string& pvname, 00072 const std::type_info& ti, 00073 const std::string& what) ; 00074 00075 }; 00076 00077 } // namespace PSEnv 00078 00079 #endif // PSENV_EXCEPTIONS_H