ShException.hpp

00001 // Sh: A GPU metaprogramming language.
00002 //
00003 // Copyright 2003-2006 Serious Hack Inc.
00004 // 
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
00018 // MA  02110-1301, USA
00020 #ifndef SHEXCEPTION_HPP
00021 #define SHEXCEPTION_HPP
00022 
00023 #include <string>
00024 #include "ShDllExport.hpp"
00025 
00026 namespace SH {
00027 
00031 class
00032 SH_DLLEXPORT ShException : public std::exception {
00033 public:
00035   ShException(const std::string& message);
00036   virtual ~ShException() throw (); // Make this class virtual in orer to get
00037                           // RTTI info in.
00038   
00040   const std::string& message() const;
00041 
00042   virtual const char* what() const throw();
00043 protected:
00044   std::string m_message;
00045 };
00046 
00049 class
00050 SH_DLLEXPORT ShParseException : public ShException {
00051 public:
00052   ShParseException(const std::string& message);
00053 };
00054 
00057 class
00058 SH_DLLEXPORT ShScopeException : public ShException {
00059 public:
00060   ShScopeException(const std::string& message);
00061 };
00062 
00065 class
00066 SH_DLLEXPORT ShImageException : public ShException {
00067 public:
00068   ShImageException(const std::string& message);
00069 };
00070 
00073 class
00074 SH_DLLEXPORT ShAlgebraException : public ShException {
00075 public:
00076   ShAlgebraException(const std::string& message);
00077 };
00078 
00081 class
00082 SH_DLLEXPORT ShOptimizerException : public ShException {
00083 public:
00084   ShOptimizerException(const std::string& message);
00085 };
00086 
00089 class
00090 SH_DLLEXPORT ShTransformerException : public ShException {
00091 public:
00092   ShTransformerException(const std::string& message);
00093 };
00094 
00097 class
00098 SH_DLLEXPORT ShBackendException : public ShException {
00099 public:
00100   ShBackendException(const std::string& message);
00101 };
00102 
00103 }
00104 
00105 #endif

Generated on Thu Feb 16 14:51:32 2006 for Sh by  doxygen 1.4.6