Goby Underwater Autonomy Project
Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
|
00001 // copyright 2010 t. schneider tes@mit.edu 00002 // 00003 // 00004 // This program is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This software is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this software. If not, see <http://www.gnu.org/licenses/>. 00016 00017 #ifndef CoreException20101005H 00018 #define CoreException20101005H 00019 00020 namespace goby 00021 { 00022 00024 class Exception : public std::runtime_error 00025 { 00026 public: 00027 Exception(const std::string& s) 00028 : std::runtime_error(s) 00029 { } 00030 00031 }; 00032 00035 class ConfigException : public Exception 00036 { 00037 public: 00038 ConfigException(const std::string& s) 00039 : Exception(s), 00040 error_(true) 00041 { } 00042 00043 void set_error(bool b) { error_ = b; } 00044 bool error() { return error_; } 00045 00046 private: 00047 bool error_; 00048 }; 00049 00050 00051 } 00052 00053 00054 #endif 00055