|
UniSet
2.6.0
|
00001 /* 00002 * Copyright (c) 2015 Pavel Vainerman. 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU Lesser General Public License as 00006 * published by the Free Software Foundation, version 2.1. 00007 * 00008 * This program is distributed in the hope that it will be useful, but 00009 * WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Lesser Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public License 00014 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00015 */ 00016 // ------------------------------------------------------------------------- 00017 #ifndef UExceptions_H_ 00018 #define UExceptions_H_ 00019 // -------------------------------------------------------------------------- 00020 struct UException 00021 { 00022 UException(): err("UException") {} 00023 explicit UException( const std::string& e ): err(e) {} 00024 explicit UException( const char* e ): err( std::string(e)) {} 00025 ~UException() {} 00026 00027 const std::string getError() 00028 { 00029 return err; 00030 } 00031 00032 std::string err; 00033 }; 00034 //--------------------------------------------------------------------------- 00035 struct UTimeOut: 00036 public UException 00037 { 00038 UTimeOut(): UException("UTimeOut") {} 00039 explicit UTimeOut( const std::string& e ): UException(e) {} 00040 ~UTimeOut() {} 00041 }; 00042 //--------------------------------------------------------------------------- 00043 struct USysError: 00044 public UException 00045 { 00046 USysError(): UException("USysError") {} 00047 explicit USysError( const std::string& e ): UException(e) {} 00048 ~USysError() {} 00049 }; 00050 //--------------------------------------------------------------------------- 00051 struct UValidateError: 00052 public UException 00053 { 00054 UValidateError(): UException("UValidateError") {} 00055 explicit UValidateError( const std::string& e ): UException(e) {} 00056 ~UValidateError() {} 00057 }; 00058 //--------------------------------------------------------------------------- 00059 #endif 00060 //---------------------------------------------------------------------------
1.7.6.1