00001 /* Glass - a distributed computing library 00002 Copyright (C) 2003-2009 Bruno Barberi Gnecco 00003 Copyright (C) 2009-2010 Corollarium Technologies 00004 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Lesser General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public 00017 License along with this library; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00021 #ifndef _GLASS_EXCEPTION_HH_ 00022 #define _GLASS_EXCEPTION_HH_ 00023 00024 #include "types.h" 00025 00026 namespace libglass { 00027 00028 class LIBGLASS_API Exception { 00029 protected: 00030 string message; 00031 public: 00035 Exception() : message("Unspecified message") {} 00036 00041 Exception(const string &message) : message(message) {} 00042 00047 Exception(const char *message) : message(message) {} 00048 00052 virtual ~Exception() {}; 00053 00059 virtual string getMessage(void) { return message; } 00060 }; 00061 00062 class EmptyException : public Exception { 00063 public: 00064 EmptyException() : Exception("Empty queue") {} 00065 }; 00066 00067 } //namespace 00068 00069 00070 00071 00072 #endif // _GLASS_EXCEPTION_HH_
1.5.8