68 : std::runtime_error(
"" )
73 : std::runtime_error( msg )
80 return "KernelException";
99 return "DynamicModuleManagementError";
118 return "NotImplemented";
132 :
KernelException(
"The expected datatype is unknown in the current context." )
141 explicit TypeMismatch(
const std::string& expected,
const std::string& provided )
142 :
KernelException(
"Expected datatype: " + expected +
", provided datatype: " + provided )
149 return "TypeMismatch";
166 :
KernelException(
"Unaccessed elements in " + what +
", in function " + where +
": " + missed )
173 return "UnaccessedDictionaryEntry";
185 std::string
compose_msg_(
const std::string& model_name )
const;
196 return "UnknownModelName";
208 std::string
compose_msg_(
const std::string& model_name )
const;
219 return "UnknownComponent";
230 std::string
compose_msg_(
const std::string& model_name )
const;
241 return "NewModelNameExists";
254 std::string
compose_msg_(
const std::string& model_name )
const;
277 std::string
compose_msg_(
const std::string& name )
const;
293 return "UnknownSynapseType";
323 return "UnknownNode";
353 return "NoThreadSiblingsAvailable";
370 return "LocalNodeExpected";
387 return "NodeWithProxiesExpected";
397 std::string
compose_msg_(
const long compartment_idx,
const std::string info )
const;
408 return "UnknownCompartment";
418 std::string
compose_msg_(
const long receptor_type,
const std::string name )
const;
429 return "UnknownReceptorType";
439 std::string
compose_msg(
const long receptor_type,
const std::string name,
const std::string event );
450 return "IncompatibleReceptorType";
463 std::string
compose_msg_(
const int id,
const std::string msg )
const;
479 return "UnknownPort";
498 :
KernelException(
"Creation of connection is not possible because:\n" + msg )
505 return "IllegalConnection";
525 msg_ =
"Deletion of connection is not possible because it does not exist.";
531 msg_ =
"Deletion of connection is not possible because:\n";
544 return "InexistentConnection";
561 msg_ = String::compose(
"Thread with id %1 is outside of range.",
id );
573 return "UnknownThread";
591 msg_ = String::compose(
"Delay value %1 is invalid: %2", delay, msg );
622 msg_ =
"Target node cannot handle input event.\n";
623 msg_ +=
" A common cause for this is an attempt to connect recording devices incorrectly.\n";
624 msg_ +=
" Note that recorders such as spike recorders must be connected as\n\n";
625 msg_ +=
" nest.Connect(neurons, spike_det)\n\n";
626 msg_ +=
" while meters such as voltmeters must be connected as\n\n";
627 msg_ +=
" nest.Connect(meter, neurons) ";
645 return "UnexpectedEvent";
669 return "UnsupportedEvent";
706 return "BadProperty";
743 return "BadParameter";
776 return "BadParameterValue";
795 msg_ =
"Dimensions of two or more variables do not match.";
801 msg_ = String::compose(
"Expected dimension size: %1 Provided dimension size: %2.", expected, provided );
819 return "DimensionMismatch";
839 return "DistributionError";
866 std::ostringstream oss;
867 oss <<
"The default resolution of " <<
Time::get_resolution() <<
" is not consistent with the value " << value
868 <<
" of property '" <<
property <<
"' in model " << model <<
".\n"
869 <<
"This is an internal NEST error, please report it at https://github.com/nest/nest-simulator/issues";
883 return "InvalidDefaultResolution";
910 std::ostringstream oss;
911 oss <<
"The time property " <<
property <<
" = " << value <<
" of model " << model
913 <<
"Please set a compatible value with SetDefaults!";
927 return "InvalidTimeInModel";
952 std::ostringstream oss;
953 oss <<
"The time property " <<
property <<
" = " << value <<
" of model " << model
968 return "StepMultipleRequired";
993 const std::string& name_a,
995 const std::string& name_b,
996 const Time& value_b )
999 std::ostringstream oss;
1000 oss <<
"In model " << model <<
", the time property " << name_a <<
" = " << value_a
1001 <<
" must be multiple of time property " << name_b <<
" = " << value_b <<
'.';
1015 return "TimeMultipleRequired";
1038 msg_ = String::compose(
1039 "In model %1 the GSL solver returned with exit status %2.\n"
1040 "Please make sure you have installed a recent GSL version (> gsl-1.10).",
1054 return "GSLSolverFailure";
1076 msg_ = String::compose(
"NEST detected a numerical instability while updating %1.", model );
1088 return "NumericalInstability";
1119 return "NamingConflict";
1135 ,
msg_( String::compose(
"Array with length %1 expected.", expected_size ) )
1148 return "RangeCheck";
1192 KeyError(
const std::string& key,
const std::string& map_type,
const std::string& map_op )
1195 msg_ = String::compose(
1196 "Key '%1' not found in map. Error encountered with map type: '%2' when applying operation: '%3'.",
1228 ,
msg_(
"InternalError" )
1246 return "InternalError";
1256class MUSICPortUnconnected :
public KernelException
1268 MUSICPortUnconnected(
const std::string& model,
const std::string& portname )
1269 : KernelException(
"MUSICPortUnconnected" )
1271 msg_ = String::compose(
1272 "Cannot use instance of model %1 because the MUSIC "
1273 "port %2 is unconnected.",
1279 what() const noexcept
override
1285 exception_name()
const override
1287 return "MUSICPortUnconnected";
1297class MUSICPortHasNoWidth :
public KernelException
1309 MUSICPortHasNoWidth(
const std::string& model,
const std::string& portname )
1310 : KernelException(
"MUSICPortHasNoWidth" )
1312 msg_ = String::compose(
1313 "Cannot use instance of model %1 because the MUSIC "
1314 "port %2 has no width specified in configuration file.",
1320 what() const noexcept
override
1326 exception_name()
const override
1328 return "MUSICPortHasNoWidth";
1337class MUSICPortAlreadyPublished :
public KernelException
1349 MUSICPortAlreadyPublished(
const std::string& model,
const std::string& portname )
1350 : KernelException(
"MUSICPortAlreadyPublished" )
1352 msg_ = String::compose(
1353 "The instance of model %1 cannot change the MUSIC "
1354 "port / establish connections %2 since it is already published.",
1360 what() const noexcept
override
1366 exception_name()
const override
1368 return "MUSICPortAlreadyPublished";
1377class MUSICSimulationHasRun :
public KernelException
1388 MUSICSimulationHasRun(
const std::string& model )
1389 : KernelException(
"MUSICSimulationHasRun" )
1391 msg_ = String::compose(
1392 "The instance of model %1 won't work, since the simulation "
1393 "has already been running",
1398 what() const noexcept
override
1404 exception_name()
const override
1406 return "MUSICSimulationHasRun";
1415class MUSICChannelUnknown :
public KernelException
1428 MUSICChannelUnknown(
const std::string& model,
const std::string& portname,
int channel )
1429 : KernelException(
"MUSICChannelUnknown" )
1431 msg_ = String::compose(
1432 "The port %1 cannot be mapped in %2 because the channel %3 "
1440 what() const noexcept
override
1446 exception_name()
const override
1448 return "MUSICChannelUnknown";
1457class MUSICPortUnknown :
public KernelException
1466 MUSICPortUnknown(
const std::string& portname )
1467 : KernelException(
"MUSICPortUnknown" )
1469 msg_ = String::compose(
"The port %1 does not exist.", portname );
1473 what() const noexcept
override
1479 exception_name()
const override
1481 return "MUSICPortUnknown";
1490class MUSICChannelAlreadyMapped :
public KernelException
1503 MUSICChannelAlreadyMapped(
const std::string& model,
const std::string& portname,
int channel )
1504 : KernelException(
"MUSICChannelAlreadyMapped" )
1506 msg_ = String::compose(
1507 "The channel %1 of port %2 has already be mapped "
1508 "to another proxy in %3.",
1515 what() const noexcept
override
1521 exception_name()
const override
1523 return "MUSICChannelAlreadyMapped";
1529class MPIPortsFileUnknown :
public KernelException
1535 explicit MPIPortsFileUnknown(
const size_t node_id )
1537 msg_ = String::compose(
1538 "The node with ID %1 requires a label, which specifies the "
1539 "folder with files containing the MPI ports.",
1544 what() const noexcept
override
1550 exception_name()
const override
1552 return "MPIPortsUnknown";
1556class MPIPortsFileMissing :
public KernelException
1562 explicit MPIPortsFileMissing(
const size_t node_id,
const std::string path )
1564 msg_ = String::compose(
1565 "The node with ID %1 expects a file with the MPI address at location %2. "
1566 "The file does not seem to exist.",
1572 what() const noexcept
override
1578 exception_name()
const override
1580 return "MPIPortsFileMissing";
1584class MPIErrorCode :
public KernelException
1590 explicit MPIErrorCode(
const int error_code );
1593 what() const noexcept
override
1599 exception_name()
const override
1601 return "MPIErrorCode";
1615 msg_ = String::compose(
1616 "Steps for backend device don't match NEST steps: "
1617 "steps expected: %1 steps executed: %2.",
1619 total_steps - steps_left );
1631 return "UnmatchedSteps";
1646 msg_ = String::compose(
"Backend %1 may not be prepare()'d multiple times.",
backend_ );
1653 msg_ = String::compose(
"Backend %1 may not be prepare()'d multiple times.",
backend_ );
1665 return "BackendPrepared";
1680 msg_ = String::compose(
"Backend %1 has already been registered.",
backend_ );
1687 msg_ = String::compose(
"Backend %1 has already been registered.",
backend_ );
1699 return "BackendAlreadyRegistered";
1715 msg_ = String::compose(
1716 "Backend %1 may not be cleanup()'d "
1717 "without preparation (multiple cleanups?).",
1725 msg_ = String::compose(
1726 "Backend %1 may not be cleanup()'d "
1727 "without preparation (multiple cleanups?).",
1740 return "BackendNotPrepared";
1755 return "LayerExpected";
1770 return "LayerNodeExpected";
1783 msg_ = String::compose(
"The name %1 is not defined.", name );
1795 return "UndefinedName";
Definition exceptions.h:1670
const std::string backend_
Definition exceptions.h:1672
BackendAlreadyRegistered(std::string &&backend)
Definition exceptions.h:1683
const char * what() const noexcept override
Definition exceptions.h:1691
BackendAlreadyRegistered(const std::string &backend)
Definition exceptions.h:1676
std::string msg_
Definition exceptions.h:1673
std::string exception_name() const override
Definition exceptions.h:1697
Definition exceptions.h:1705
BackendNotPrepared(std::string &&backend)
Definition exceptions.h:1721
const char * what() const noexcept override
Definition exceptions.h:1732
BackendNotPrepared(const std::string &backend)
Definition exceptions.h:1711
const std::string backend_
Definition exceptions.h:1707
std::string msg_
Definition exceptions.h:1708
std::string exception_name() const override
Definition exceptions.h:1738
Definition exceptions.h:1636
std::string msg_
Definition exceptions.h:1639
std::string exception_name() const override
Definition exceptions.h:1663
const char * what() const noexcept override
Definition exceptions.h:1657
const std::string backend_
Definition exceptions.h:1638
BackendPrepared(const std::string &backend)
Definition exceptions.h:1642
BackendPrepared(std::string &&backend)
Definition exceptions.h:1649
Exception to be thrown if an invalid delay is used in a connection.
Definition exceptions.h:583
const char * what() const noexcept override
Definition exceptions.h:595
std::string msg_
Definition exceptions.h:585
std::string exception_name() const override
Definition exceptions.h:601
BadDelay(double delay, const std::string &msg)
Definition exceptions.h:588
Exception to be thrown if a parameter value is not acceptable.
Definition exceptions.h:752
~BadParameterValue()
Definition exceptions.h:769
std::string exception_name() const override
Definition exceptions.h:774
std::string msg_
Definition exceptions.h:753
BadParameterValue()
Definition exceptions.h:757
BadParameterValue(std::string msg)
Definition exceptions.h:763
Exception to be thrown if a parameter cannot be set.
Definition exceptions.h:717
BadParameter()
Definition exceptions.h:723
std::string msg_
Definition exceptions.h:719
std::string exception_name() const override
Definition exceptions.h:741
const char * what() const noexcept override
Definition exceptions.h:735
BadParameter(std::string msg)
Definition exceptions.h:728
Exception to be thrown if a status parameter is incomplete or inconsistent.
Definition exceptions.h:680
BadProperty()
Definition exceptions.h:686
const char * what() const noexcept override
Definition exceptions.h:698
std::string msg_
Definition exceptions.h:682
BadProperty(std::string msg)
Definition exceptions.h:691
std::string exception_name() const override
Definition exceptions.h:704
Exception to be thrown if the dimensions of two or more objects do not agree.
Definition exceptions.h:787
DimensionMismatch()
Definition exceptions.h:792
DimensionMismatch(const std::string &msg)
Definition exceptions.h:804
DimensionMismatch(int expected, int provided)
Definition exceptions.h:798
std::string exception_name() const override
Definition exceptions.h:817
std::string msg_
Definition exceptions.h:789
const char * what() const noexcept override
Definition exceptions.h:811
Exception to be thrown if a problem with the distribution of elements is encountered.
Definition exceptions.h:829
std::string exception_name() const override
Definition exceptions.h:837
DistributionError()
Definition exceptions.h:831
Exception to be thrown if loading or unloading a dynamically loaded module fails.
Definition exceptions.h:89
DynamicModuleManagementError(const std::string &msg)
Definition exceptions.h:91
std::string exception_name() const override
Definition exceptions.h:97
Exception to be thrown if a GSL solver does not return GSL_SUCCESS.
Definition exceptions.h:1024
const char * what() const noexcept override
Definition exceptions.h:1046
std::string msg_
Definition exceptions.h:1026
std::string exception_name() const override
Definition exceptions.h:1052
GSLSolverFailure(const std::string &model, const int status)
Definition exceptions.h:1035
Exception to be thrown if an error occured in an I/O operation.
Definition exceptions.h:1157
std::string exception_name() const override
Definition exceptions.h:1175
std::string msg_
Definition exceptions.h:1159
IOError()
Definition exceptions.h:1162
const char * what() const noexcept override
Definition exceptions.h:1169
To be thrown if a connection is not possible.
Definition exceptions.h:490
std::string exception_name() const override
Definition exceptions.h:503
IllegalConnection()
Definition exceptions.h:492
IllegalConnection(std::string msg)
Definition exceptions.h:497
Exception to be thrown if the specified receptor type does not accept the event type.
Definition exceptions.h:438
std::string compose_msg(const long receptor_type, const std::string name, const std::string event)
Definition exceptions.cpp:140
std::string exception_name() const override
Definition exceptions.h:448
IncompatibleReceptorType(long receptor_type, std::string name, std::string event_type)
Definition exceptions.h:442
To be thrown if a connection does not exists but something is to be done with it.
Definition exceptions.h:517
const char * what() const noexcept override
Definition exceptions.h:536
InexistentConnection(const std::string &msg)
Definition exceptions.h:528
std::string exception_name() const override
Definition exceptions.h:542
std::string msg_
Definition exceptions.h:519
InexistentConnection()
Definition exceptions.h:522
Exception to be thrown if an internal error occurs.
Definition exceptions.h:1220
const char * what() const noexcept override
Definition exceptions.h:1238
std::string msg_
Definition exceptions.h:1222
InternalError()
Definition exceptions.h:1226
std::string exception_name() const override
Definition exceptions.h:1244
InternalError(std::string msg)
Definition exceptions.h:1232
Exception to be thrown on prototype construction if Time objects incompatible.
Definition exceptions.h:851
std::string exception_name() const override
Definition exceptions.h:881
std::string msg_
Definition exceptions.h:853
const char * what() const noexcept override
Definition exceptions.h:875
InvalidDefaultResolution(const std::string &model, const std::string &property, const Time &value)
Definition exceptions.h:863
Exception to be thrown on instance construction if Time objects incompatible.
Definition exceptions.h:895
const char * what() const noexcept override
Definition exceptions.h:919
std::string exception_name() const override
Definition exceptions.h:925
std::string msg_
Definition exceptions.h:897
InvalidTimeInModel(const std::string &model, const std::string &property, const Time &value)
Definition exceptions.h:907
Base class for all Kernel exceptions.
Definition exceptions.h:65
virtual std::string exception_name() const
Definition exceptions.h:78
KernelException(const std::string &msg)
Definition exceptions.h:72
KernelException()
Definition exceptions.h:67
Exception to be thrown if when trying to delete an entry from DynamicRecordablesMap that does not exi...
Definition exceptions.h:1187
KeyError(const std::string &key, const std::string &map_type, const std::string &map_op)
Definition exceptions.h:1192
std::string exception_name() const override
Definition exceptions.h:1209
const char * what() const noexcept override
Definition exceptions.h:1203
std::string msg_
Definition exceptions.h:1189
Definition exceptions.h:1745
std::string exception_name() const override
Definition exceptions.h:1753
LayerExpected()
Definition exceptions.h:1747
Definition exceptions.h:1760
std::string exception_name() const override
Definition exceptions.h:1768
LayerNodeExpected()
Definition exceptions.h:1762
Definition exceptions.h:358
std::string exception_name() const override
Definition exceptions.h:368
std::string compose_msg_(const int id) const
Definition exceptions.cpp:109
LocalNodeExpected(int id)
Definition exceptions.h:362
Exception to be thrown if a (neuron/synapse) model with the the specified ID is used within the netwo...
Definition exceptions.h:253
ModelInUse(const std::string &model_name)
Definition exceptions.h:257
std::string exception_name() const override
Definition exceptions.h:263
std::string compose_msg_(const std::string &model_name) const
Definition exceptions.cpp:74
Throw if an existing name is attempted to be redefined.
Definition exceptions.h:1099
NamingConflict(const std::string &msg)
Definition exceptions.h:1104
const char * what() const noexcept override
Definition exceptions.h:1111
std::string msg_
Definition exceptions.h:1101
std::string exception_name() const override
Definition exceptions.h:1117
Exception to be thrown if a name requested for a user-defined model exist already.
Definition exceptions.h:229
std::string compose_msg_(const std::string &model_name) const
Definition exceptions.cpp:67
NewModelNameExists(const std::string &model_name)
Definition exceptions.h:233
std::string exception_name() const override
Definition exceptions.h:239
Exception to be thrown if the specified Node does not exist.
Definition exceptions.h:336
std::string exception_name() const override
Definition exceptions.h:351
std::string compose_msg_(const int id) const
Definition exceptions.cpp:102
NoThreadSiblingsAvailable()
Definition exceptions.h:340
NoThreadSiblingsAvailable(int id)
Definition exceptions.h:345
Definition exceptions.h:375
std::string compose_msg_(const int id) const
Definition exceptions.cpp:116
std::string exception_name() const override
Definition exceptions.h:385
NodeWithProxiesExpected(int id)
Definition exceptions.h:379
Exception to be thrown if a feature is unavailable.
Definition exceptions.h:108
std::string exception_name() const override
Definition exceptions.h:116
NotImplemented(const std::string &msg)
Definition exceptions.h:110
Exception to be thrown if numerical instabilities are detected.
Definition exceptions.h:1063
const char * what() const noexcept override
Definition exceptions.h:1080
std::string exception_name() const override
Definition exceptions.h:1086
NumericalInstability(const std::string &model)
Definition exceptions.h:1073
std::string msg_
Definition exceptions.h:1065
Exception to be thrown if a given array has the wrong size.
Definition exceptions.h:1128
RangeCheck(const size_t expected_size)
Definition exceptions.h:1133
const char * what() const noexcept override
Definition exceptions.h:1140
std::string exception_name() const override
Definition exceptions.h:1146
std::string msg_
Definition exceptions.h:1130
Exception to be thrown if a Time object should be multiple of the resolution.
Definition exceptions.h:937
std::string exception_name() const override
Definition exceptions.h:966
StepMultipleRequired(const std::string &model, const std::string &property, const Time &value)
Definition exceptions.h:949
const char * what() const noexcept override
Definition exceptions.h:960
std::string msg_
Definition exceptions.h:939
Exception to be thrown if a Time object should be a multiple of another.
Definition exceptions.h:978
std::string exception_name() const override
Definition exceptions.h:1013
const char * what() const noexcept override
Definition exceptions.h:1007
TimeMultipleRequired(const std::string &model, const std::string &name_a, const Time &value_a, const std::string &name_b, const Time &value_b)
Definition exceptions.h:992
std::string msg_
Definition exceptions.h:980
Definition nest_time.h:135
static Time get_resolution()
Definition nest_time.h:325
Exception to be thrown if a given type does not match the expected type.
Definition exceptions.h:128
std::string exception_name() const override
Definition exceptions.h:147
TypeMismatch(const std::string &expected)
Definition exceptions.h:136
TypeMismatch(const std::string &expected, const std::string &provided)
Definition exceptions.h:141
TypeMismatch()
Definition exceptions.h:131
Not all elements in a Dictionary have been accessed.
Definition exceptions.h:163
UnaccessedDictionaryEntry(const std::string &what, const std::string &where, const std::string &missed)
Definition exceptions.h:165
std::string exception_name() const override
Definition exceptions.h:171
Definition exceptions.h:1775
const char * what() const noexcept override
Definition exceptions.h:1787
UndefinedName(std::string name)
Definition exceptions.h:1780
std::string exception_name() const override
Definition exceptions.h:1793
std::string msg_
Definition exceptions.h:1777
Exception to be thrown by the event handler of a node if it receives an event it cannot handle.
Definition exceptions.h:614
UnexpectedEvent(const std::string &msg)
Definition exceptions.h:630
std::string exception_name() const override
Definition exceptions.h:643
const char * what() const noexcept override
Definition exceptions.h:637
std::string msg_
Definition exceptions.h:616
UnexpectedEvent()
Definition exceptions.h:619
Definition exceptions.h:396
std::string exception_name() const override
Definition exceptions.h:406
UnknownCompartment(long compartment_idx, std::string info)
Definition exceptions.h:400
std::string compose_msg_(const long compartment_idx, const std::string info) const
Definition exceptions.cpp:126
Exception to be thrown if a component with the the specified name does not exist.
Definition exceptions.h:207
UnknownComponent(const std::string &component_name)
Definition exceptions.h:211
std::string compose_msg_(const std::string &model_name) const
Definition exceptions.cpp:55
std::string exception_name() const override
Definition exceptions.h:217
Exception to be thrown if a model with the the specified name does not exist.
Definition exceptions.h:184
std::string exception_name() const override
Definition exceptions.h:194
UnknownModelName(const std::string &model_name)
Definition exceptions.h:188
std::string compose_msg_(const std::string &model_name) const
Definition exceptions.cpp:43
Exception to be thrown if the specified Node does not exist.
Definition exceptions.h:306
UnknownNode(int id)
Definition exceptions.h:315
UnknownNode()
Definition exceptions.h:310
std::string exception_name() const override
Definition exceptions.h:321
std::string compose_msg_(const int id) const
Definition exceptions.cpp:95
To be thrown if a port does not exists.
Definition exceptions.h:461
UnknownPort(int id)
Definition exceptions.h:466
UnknownPort(int id, std::string msg)
Definition exceptions.h:471
std::string compose_msg_(const int id) const
Definition exceptions.cpp:147
std::string exception_name() const override
Definition exceptions.h:477
Exception to be thrown if the specified receptor type does not exist in the node.
Definition exceptions.h:417
std::string compose_msg_(const long receptor_type, const std::string name) const
Definition exceptions.cpp:133
UnknownReceptorType(long receptor_type, std::string name)
Definition exceptions.h:421
std::string exception_name() const override
Definition exceptions.h:427
Exception to be thrown if the specified Synapse type does not exist.
Definition exceptions.h:275
UnknownSynapseType(int id)
Definition exceptions.h:280
std::string compose_msg_(const int id) const
Definition exceptions.cpp:81
UnknownSynapseType(std::string name)
Definition exceptions.h:285
std::string exception_name() const override
Definition exceptions.h:291
Exception to be thrown if a thread id outside the range encountered.
Definition exceptions.h:553
UnknownThread(int id)
Definition exceptions.h:558
std::string exception_name() const override
Definition exceptions.h:571
std::string msg_
Definition exceptions.h:555
const char * what() const noexcept override
Definition exceptions.h:565
Definition exceptions.h:1607
std::string msg_
Definition exceptions.h:1609
std::string exception_name() const override
Definition exceptions.h:1629
const char * what() const noexcept override
Definition exceptions.h:1623
UnmatchedSteps(int steps_left, int total_steps)
Definition exceptions.h:1612
Exception to be thrown by a Connection object if a connection with an unsupported event type is attem...
Definition exceptions.h:657
std::string compose_msg_() const
Definition exceptions.cpp:163
std::string exception_name() const override
Definition exceptions.h:667
UnsupportedEvent()
Definition exceptions.h:661
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33