Skip to content

Commit

Permalink
Print the name of the FMU in errormsg
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed Jun 17, 2019
1 parent ff06240 commit 0851f2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cpp/fmi/v1/fmu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ std::shared_ptr<v1::slave_instance> fmu::instantiate_v1_slave(
if (isSingleton && !instances_.empty()) {
throw error(
make_error_code(errc::unsupported_feature),
"FMU can only be instantiated once");
"FMU '" + modelDescription_.name + "' can only be instantiated once");
}
auto instance = std::shared_ptr<slave_instance>(
new slave_instance(shared_from_this(), instanceName));
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fmi/v2/fmu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ std::shared_ptr<v2::slave_instance> fmu::instantiate_v2_slave(
if (isSingleton && !instances_.empty()) {
throw error(
make_error_code(errc::unsupported_feature),
"FMU can only be instantiated once");
"FMU '" + modelDescription_.name + "' can only be instantiated once");
}
auto instance = std::shared_ptr<slave_instance>(
new slave_instance(shared_from_this(), instanceName));
Expand Down

0 comments on commit 0851f2a

Please sign in to comment.