CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
user_errors.h
Go to the documentation of this file.
1 #ifndef _USER_ERRORS_H_
2 #define _USER_ERRORS_H_
3 
4 #include "carlsim_api.h"
5 
6 #include <string> // std::string
7 
16 public:
17  // +++++ PUBLIC PROPERTIES ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
18 
26  enum errorType {
64  WRONG_NEURON_TYPE
65  };
66 
67 
68  // +++++ PUBLIC METHODS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
69 
83  static void assertTrue(bool statement, errorType errorIfAssertionFails, std::string errorFunc,
84  std::string errorMsgPrefix="", std::string errorMsgSuffix="");
85 
86 // static void userAssertNonZero();
87 // static void userAssertNonNegative();
88 
89 private:
90  // +++++ PRIVATE METHODS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
91 
100  static void throwError(std::string errorFunc, errorType error, std::string errorMsgPrefix="",
101  std::string errorMsgSuffix="");
102 };
103 
104 #endif
parameter cannot have smaller vaule than some vaule
Definition: user_errors.h:38
parameter cannot be zero
Definition: user_errors.h:44
parameters must be identical
Definition: user_errors.h:50
parameters cannot be identical
Definition: user_errors.h:34
could not open file
Definition: user_errors.h:46
parameter cannot be of type UNKNOWN
Definition: user_errors.h:43
could not create a file
Definition: user_errors.h:45
function cannot be called in certain mode
Definition: user_errors.h:30
errorType
an enum of all possible error codes
Definition: user_errors.h:26
#define CARLSIM_API
Definition: carlsim_api.h:14
parameter must be 0
Definition: user_errors.h:59
function cannot be called in certain state
Definition: user_errors.h:31
function cannot be called because network has already bun run
Definition: user_errors.h:61
parameter cannot have larger vaule than some vaule
Definition: user_errors.h:37
some parameters must have the same sign
Definition: user_errors.h:60
the specified group id is unknown
Definition: user_errors.h:62
parameter must be set to
Definition: user_errors.h:56
deprecated function
Definition: user_errors.h:48
could not read file
Definition: user_errors.h:47
parameter cannot be set to
Definition: user_errors.h:42
parameter must be in some range
Definition: user_errors.h:51
parameter cannot have NULL value
Definition: user_errors.h:36
parameter must be off
Definition: user_errors.h:53
an unknown error
Definition: user_errors.h:63
must be in custom logger mode
Definition: user_errors.h:49
parameter cannot be on
Definition: user_errors.h:40
parameter must be smaller than
Definition: user_errors.h:58
parameter cannot have positive value (opposite to "must be", but includes zero)
Definition: user_errors.h:41
parameter must be on
Definition: user_errors.h:54
parameter must be larger than
Definition: user_errors.h:57
function can only be called in certain state
Definition: user_errors.h:29
parameter cannot be off
Definition: user_errors.h:39
keyword ALL is not allowed for this variable
Definition: user_errors.h:27
cannot be connected twice
Definition: user_errors.h:33
cannot be both synaptically and compartmentally connected
Definition: user_errors.h:32
parameter must have negative value
Definition: user_errors.h:52
parameter must have positive value
Definition: user_errors.h:55
function can only be called in certain mode
Definition: user_errors.h:28
parameter cannot have negative value (opposite to "must be", but includes zero)
Definition: user_errors.h:35
Static Class for handling user errors.
Definition: user_errors.h:15