00001 /* 00002 * 00003 * D-Bus++ - C++ bindings for D-Bus 00004 * 00005 * Copyright (C) 2005-2009 Evgeny Sinelnikov <sin@etersoft.ru> 00006 * 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 */ 00023 00024 00025 #ifndef __DBUSXX_SYSTEMERROR_H 00026 #define __DBUSXX_SYSTEMERROR_H 00027 00028 #ifdef HAVE_CONFIG_H 00029 #include <config.h> 00030 #endif 00031 00032 #include <stdexcept> 00033 00034 namespace DBus { 00035 00036 class DXXAPI SystemError: public std::runtime_error 00037 { 00038 public: 00039 explicit SystemError(std::string what): 00040 std::runtime_error(what) {} 00041 }; 00042 00043 struct DXXAPI ConnectionTerminatedError: public SystemError 00044 { 00045 public: 00046 explicit ConnectionTerminatedError(): 00047 SystemError("connection terminated") 00048 {} 00049 }; 00050 00051 struct DXXAPI SetAuthMechanismsError: public SystemError 00052 { 00053 public: 00054 explicit SetAuthMechanismsError(): 00055 SystemError("set authentificaton mechanisms") 00056 {} 00057 }; 00058 00059 } /* namespace DBus */ 00060 00061 #endif//__DBUSXX_SYSTEMERROR_H