00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _CMS_CMSEXCEPTION_H_
00019 #define _CMS_CMSEXCEPTION_H_
00020
00021
00022 #include <string>
00023 #include <vector>
00024 #include <iostream>
00025 #include <exception>
00026
00027 #include <cms/Config.h>
00028
00029 namespace cms {
00030
00031 class CMSExceptionData;
00032
00050 class CMS_API CMSException : public std::exception {
00051 private:
00052
00053
00054 CMSExceptionData* data;
00055
00056 public:
00057
00058 CMSException();
00059
00060 CMSException(const CMSException& ex);
00061
00062 CMSException(const std::string& message);
00063
00064 CMSException(const std::string& message, const std::exception* cause);
00065
00066 CMSException(const std::string& message, const std::exception* cause,
00067 const std::vector<std::pair<std::string, int> >& stackTrace);
00068
00069 virtual ~CMSException() throw();
00070
00076 virtual std::string getMessage() const;
00077
00087 virtual const std::exception* getCause() const;
00088
00095 virtual std::vector< std::pair< std::string, int> > getStackTrace() const;
00096
00102 virtual void setMark(const char* file, const int lineNumber);
00103
00107 virtual void printStackTrace() const;
00108
00114 virtual void printStackTrace(std::ostream& stream) const;
00115
00121 virtual std::string getStackTraceString() const;
00122
00128 virtual const char* what() const throw();
00129
00138 virtual CMSException* clone();
00139
00140 private:
00141
00149 CMSException& operator=(const cms::CMSException&) {
00150 return *this;
00151 }
00152
00153 };
00154
00155 }
00156
00157 #endif