Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:43:50

0001 #ifndef CUSTOM_EXCEPTION_H
0002 #define CUSTOM_EXCEPTION_H
0003 
0004 /**
0005  * @file CustomException.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date September 16, 2016
0008  * @version 1.0
0009  */
0010 
0011 #include <exception>
0012 #include <string>
0013 
0014 namespace ElemUtils {
0015 
0016 /**
0017  * @class CustomException
0018  * @brief
0019  */
0020 class CustomException: public std::exception {
0021 public:
0022     CustomException(const std::string &className, const std::string &funcName,
0023             const std::string &errorMsg) throw ();
0024     virtual ~CustomException() throw ();
0025 
0026     virtual const char* what() const throw ();
0027 
0028     const std::string& getClassName() const;
0029     const std::string& getErrorMsg() const;
0030     const std::string& getFuncName() const;
0031 
0032 private:
0033     std::string m_className;
0034     std::string m_funcName;
0035     std::string m_errorMsg;
0036 
0037     std::string m_finalExceptionMsg;
0038 };
0039 
0040 } /* namespace ElemUtils */
0041 
0042 #endif /* CUSTOM_EXCEPTION_H */