00001 /************************************************************************************************** 00002 * LibNeural++ v.0.2 - All-purpose library for managing neural networks * 00003 * Copyright (C) 2009, BlackLight * 00004 * * 00005 * This program is free software: you can redistribute it and/or modify it under the terms of the * 00006 * GNU General Public License as published by the Free Software Foundation, either version 3 of * 00007 * the License, or (at your option) any later version. This program is distributed in the hope * 00008 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * 00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * 00010 * more details. You should have received a copy of the GNU General Public License along with * 00011 * this program. If not, see <http://www.gnu.org/licenses/>. * 00012 **************************************************************************************************/ 00013 00014 #ifndef __cplusplus 00015 #error "This is a C++ library, you know, so you'd better use a C++ compiler to compile it" 00016 #else 00017 00018 #ifndef __NEURALPP_EXCEPTION 00019 #define __NEURALPP_EXCEPTION 00020 00021 #include <exception> 00022 00023 namespace neuralpp { 00028 class NetworkFileNotFoundException : public std::exception { 00029 public: 00030 NetworkFileNotFoundException() {} 00031 const char* what() const throw() { return "Attempt to load a neural network from an invalid network file"; } 00032 }; 00033 00038 class InvalidXMLException : public std::exception { 00039 public: 00040 InvalidXMLException() {} 00041 const char* what() const throw() { return "Attempt to load an invalid XML file"; } 00042 }; 00043 } 00044 00045 #endif 00046 #endif 00047