CARLsim  3.0.3
CARLsim: a GPU-accelerated SNN simulator
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
user_errors.h
Go to the documentation of this file.
1 #ifndef _USER_ERRORS_H_
2 #define _USER_ERRORS_H_
3 
4 #include <string> // std::string
5 
13 class UserErrors {
14 public:
15  // +++++ PUBLIC PROPERTIES ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
16 
24  enum errorType {
60  };
61 
62 
63  // +++++ PUBLIC METHODS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
64 
78  static void assertTrue(bool statement, errorType errorIfAssertionFails, std::string errorFunc,
79  std::string errorMsgPrefix="", std::string errorMsgSuffix="");
80 
81 // static void userAssertNonZero();
82 // static void userAssertNonNegative();
83 
84 private:
85  // +++++ PRIVATE METHODS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
86 
95  static void throwError(std::string errorFunc, errorType error, std::string errorMsgPrefix="",
96  std::string errorMsgSuffix="");
97 };
98 
99 #endif
parameter cannot have smaller vaule than some vaule
Definition: user_errors.h:34
parameter cannot be zero
Definition: user_errors.h:40
parameters must be identical
Definition: user_errors.h:45
parameters cannot be identical
Definition: user_errors.h:30
could not open file
Definition: user_errors.h:42
parameter cannot be of type UNKNOWN
Definition: user_errors.h:39
could not create a file
Definition: user_errors.h:41
function cannot be called in certain mode
Definition: user_errors.h:28
errorType
an enum of all possible error codes
Definition: user_errors.h:24
parameter must be 0
Definition: user_errors.h:54
function cannot be called in certain state
Definition: user_errors.h:29
function cannot be called because network has already bun run
Definition: user_errors.h:56
parameter cannot have larger vaule than some vaule
Definition: user_errors.h:33
some parameters must have the same sign
Definition: user_errors.h:55
the specified group id is unknown
Definition: user_errors.h:57
parameter must be set to
Definition: user_errors.h:51
deprecated function
Definition: user_errors.h:43
parameter cannot be set to
Definition: user_errors.h:38
parameter must be in some range
Definition: user_errors.h:46
parameter cannot have NULL value
Definition: user_errors.h:32
parameter must be off
Definition: user_errors.h:48
an unknown error
Definition: user_errors.h:58
function cannot be applied to neuron type
Definition: user_errors.h:59
must be in custom logger mode
Definition: user_errors.h:44
parameter cannot be on
Definition: user_errors.h:36
parameter must be smaller than
Definition: user_errors.h:53
parameter cannot have positive value (opposite to "must be", but includes zero)
Definition: user_errors.h:37
parameter must be on
Definition: user_errors.h:49
parameter must be larger than
Definition: user_errors.h:52
function can only be called in certain state
Definition: user_errors.h:27
parameter cannot be off
Definition: user_errors.h:35
static void assertTrue(bool statement, errorType errorIfAssertionFails, std::string errorFunc, std::string errorMsgPrefix="", std::string errorMsgSuffix="")
simple wrapper for assert statement
keyword ALL is not allowed for this variable
Definition: user_errors.h:25
parameter must have negative value
Definition: user_errors.h:47
parameter must have positive value
Definition: user_errors.h:50
function can only be called in certain mode
Definition: user_errors.h:26
parameter cannot have negative value (opposite to "must be", but includes zero)
Definition: user_errors.h:31
Static Class for handling user errors.
Definition: user_errors.h:13