00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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
00039 class NetworkFileWriteException : public std::exception {
00040 public:
00041 NetworkFileWriteException() {}
00042 const char* what() const throw() { return "There was an error while writing the network file"; }
00043 };
00044
00049 class InvalidXMLException : public std::exception {
00050 public:
00051 InvalidXMLException() {}
00052 const char* what() const throw() { return "Attempt to load an invalid XML file"; }
00053 };
00054
00060 class NetworkIndexOutOfBoundsException : public std::exception {
00061 public:
00062 NetworkIndexOutOfBoundsException() {}
00063 const char* what() const throw() { return "Attempt to access a non-existing neuron"; }
00064 };
00065
00071 class InvalidSynapticalWeightException : public std::exception {
00072 public:
00073 InvalidSynapticalWeightException() {}
00074 const char* what() const throw() { return "Attempt to set an invalid weight for the synapsis"; }
00075 };
00076 }
00077
00078 #endif
00079 #endif
00080