Skip to content

Commit 69ea946

Browse files
Add exception for misconfigured parameter dependence
Co-authored-by: Samuel Leweke <[email protected]>
1 parent 5933c75 commit 69ea946

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcadet/ParameterDependenceFactory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace cadet
7373
if (it == _paramStateDeps.end())
7474
{
7575
// ParameterDependence was not found
76-
return nullptr;
76+
throw InvalidParameterException("Parameter state dependence " + name + " does not exist.");
7777
}
7878

7979
// Call factory function (thanks to type erasure of std::function we can store
@@ -87,7 +87,7 @@ namespace cadet
8787
if (it == _paramParamDeps.end())
8888
{
8989
// ParameterDependence was not found
90-
return nullptr;
90+
throw InvalidParameterException("Parameter parameter dependence " + name + " does not exist.");
9191
}
9292

9393
// Call factory function (thanks to type erasure of std::function we can store

0 commit comments

Comments
 (0)