/
nickware_group
/
interference
Обзор
Документация
Войти
/
nickware_group
/
interference
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
include/indk/error.h
60 строк
2 KB
nickware44
Namespace renamed ('inn' -> 'indk')
23 авг 2023, 14:19
23 авг 2023, 14:19
8a0f559
Код
Авторство
О чём код?
///////////////////////////////////////////////////////////////////////////// // Name: indk/error.h // Purpose: Exception system class header // Author: Nickolay Babbysh // Created: 07.05.2019 // Copyright: (c) NickWare Group // Licence: MIT licence ///////////////////////////////////////////////////////////////////////////// #ifndef INTERFERENCE_ERROR_H #define INTERFERENCE_ERROR_H #include <iostream> #include <exception> #include <vector> #include <string> namespace indk { /// Error handler class. class Error: public std::exception { public: typedef unsigned int ExceptionType; /** * Exception types. */ typedef enum { /// Out of neuron list. EX_NEURALNET_NEURONS, /// The number of input signals does not match the neural net entries count. EX_NEURALNET_INPUT, /// Out of neural net entries list. EX_NEURALNET_ENTRIES, /// The number of links more than the neuron entries count. EX_NEURALNET_NEURON_ENTRIES, EX_NEURALNET_LINKTYPE, /// The number of input signals does not match the neuron entries count. EX_NEURON_INPUT, /// Out of entry list. EX_NEURON_ENTRIES, /// Out of receptor list. EX_NEURON_RECEPTORS, /// Coordinates out of range. EX_POSITION_OUT_RANGES, /// Not equal coordinates ranges. EX_POSITION_RANGES, /// Not equal space dimensions of positions. EX_POSITION_DIMENSIONS } Exceptions; Error(); explicit Error(ExceptionType); explicit Error(ExceptionType, std::vector<float>); const char* what() const noexcept override; private: ExceptionType ET; std::vector<float> ED; }; } #endif //INTERFERENCE_ERROR_H