00001 // 00002 // Copyright (C) 2005-2006 Rational Discovery LLC 00003 // 00004 // @@ All Rights Reserved @@ 00005 // This file is part of the RDKit. 00006 // The contents are covered by the terms of the BSD license 00007 // which is included in the file license.txt, found at the root 00008 // of the RDKit source tree. 00009 // 00010 00011 #ifndef _DATASTRUCTS_EXCEPTION_H_20050126 00012 #define _DATASTRUCTS_EXCEPTION_H_20050126 00013 00014 class DatastructsException : public std::exception { 00015 public: 00016 //! construct with an error message 00017 DatastructsException(const char *msg) : _msg(msg) {}; 00018 //! construct with an error message 00019 DatastructsException(const std::string msg) : _msg(msg) {}; 00020 //! get the error message 00021 const char *message () const { return _msg.c_str(); }; 00022 ~DatastructsException () throw () {}; 00023 private: 00024 std::string _msg; 00025 }; 00026 00027 #endif
1.7.1