CARLsim
5.0.0
CARLsim: a GPU-accelerated SNN simulator
|
Go to the documentation of this file.
16 std::string errorMsgPrefix, std::string errorMsgSuffix) {
18 throwError(errorFunc,errorIfAssertionFails,errorMsgPrefix,errorMsgSuffix);
28 void UserErrors::throwError(std::string errorFunc, errorType error, std::string errorMsgPrefix,
29 std::string errorMsgSuffix) {
31 std::string errorMsg = errorMsgPrefix;
36 errorMsg +=
" cannot be ALL.";
break;
38 errorMsg +=
" can only be called in mode ";
break;
40 errorMsg +=
" can only be called in state ";
break;
42 errorMsg +=
" cannot be called in mode ";
break;
44 errorMsg +=
" cannot be called in state ";
break;
46 errorMsg +=
" cannot be both synaptically and compartmentally connected.";
break;
48 errorMsg +=
" connectCompartments is bidirectional: connecting same groups twice is illegal ";
break;
50 errorMsg +=
" cannot be identical.";
break;
52 errorMsg +=
" cannot be larger than ";
break;
54 errorMsg +=
" cannot be negative.";
break;
56 errorMsg +=
" cannot be NULL.";
break;
58 errorMsg +=
" cannot be positive.";
break;
60 errorMsg +=
" cannot not be off at this point.";
break;
62 errorMsg +=
" cannot be on at this point.";
break;
64 errorMsg +=
" cannot be set to ";
break;
66 errorMsg +=
" cannot be smaller than ";
break;
68 errorMsg +=
" cannot be of type UNKNOWN.";
break;
70 errorMsg +=
" cannot be zero.";
break;
72 errorMsg +=
" could not be created.";
break;
74 errorMsg +=
" could not be opened.";
break;
76 errorMsg +=
" could not be read.";
break;
78 errorMsg +=
" is deprecated.";
break;
80 errorMsg +=
" must be identical.";
break;
82 errorMsg +=
" must be larger than ";
break;
84 errorMsg +=
" must be negative.";
break;
86 errorMsg +=
" must be positive.";
break;
88 errorMsg +=
" must be off at this point.";
break;
90 errorMsg +=
" must be on at this point.";
break;
92 errorMsg +=
" must be in the range ";
break;
94 errorMsg +=
" must be set to ";
break;
96 errorMsg +=
" must be smaller than ";
break;
98 errorMsg +=
" must have the same sign.";
break;
100 errorMsg +=
" cannot be called after network has been run.";
break;
102 errorMsg +=
" is unknown.";
break;
104 errorMsg +=
" cannot be called on this neuron type.";
break;
107 errorMsg +=
". An unknown error has occurred.";
break;
109 errorMsg += errorMsgSuffix;
#define CARLSIM_ERROR(where, what)
@ CANNOT_BE_OFF
parameter cannot be off
@ CANNOT_BE_LARGER
parameter cannot have larger vaule than some vaule
@ CANNOT_BE_SET_TO
parameter cannot be set to
@ CANNOT_BE_POSITIVE
parameter cannot have positive value (opposite to "must be", but includes zero)
@ CANNOT_BE_IDENTICAL
parameters cannot be identical
@ CANNOT_BE_ON
parameter cannot be on
@ MUST_BE_SMALLER
parameter must be smaller than
@ MUST_BE_IDENTICAL
parameters must be identical
@ UNKNOWN_GROUP_ID
the specified group id is unknown
@ CAN_ONLY_BE_CALLED_IN_STATE
function can only be called in certain state
@ MUST_BE_POSITIVE
parameter must have positive value
@ NETWORK_ALREADY_RUN
function cannot be called because network has already bun run
@ CANNOT_BE_CALLED_IN_STATE
function cannot be called in certain state
@ MUST_BE_ON
parameter must be on
@ FILE_CANNOT_CREATE
could not create a file
@ MUST_BE_IN_RANGE
parameter must be in some range
@ CANNOT_BE_NULL
parameter cannot have NULL value
@ FILE_CANNOT_OPEN
could not open file
@ CANNOT_BE_CONN_TWICE
cannot be connected twice
@ IS_DEPRECATED
deprecated function
@ WRONG_NEURON_TYPE
function cannot be applied to neuron type
@ MUST_BE_LARGER
parameter must be larger than
@ CANNOT_BE_CALLED_IN_MODE
function cannot be called in certain mode
@ MUST_BE_OFF
parameter must be off
@ CAN_ONLY_BE_CALLED_IN_MODE
function can only be called in certain mode
@ UNKNOWN
an unknown error
errorType
an enum of all possible error codes
@ CANNOT_BE_UNKNOWN
parameter cannot be of type UNKNOWN
@ FILE_CANNOT_READ
could not read file
@ CANNOT_BE_ZERO
parameter cannot be zero
@ MUST_BE_NEGATIVE
parameter must have negative value
@ MUST_BE_SET_TO
parameter must be set to
@ MUST_HAVE_SAME_SIGN
some parameters must have the same sign
static void assertTrue(bool statement, errorType errorIfAssertionFails, std::string errorFunc, std::string errorMsgPrefix="", std::string errorMsgSuffix="")
simple wrapper for assert statement
@ CANNOT_BE_NEGATIVE
parameter cannot have negative value (opposite to "must be", but includes zero)
@ CANNOT_BE_CONN_SYN_AND_COMP
cannot be both synaptically and compartmentally connected
@ ALL_NOT_ALLOWED
keyword ALL is not allowed for this variable
@ CANNOT_BE_SMALLER
parameter cannot have smaller vaule than some vaule