Skip to content

Commit

Permalink
Merge pull request #270 from open-simulation-platform/feature/improve…
Browse files Browse the repository at this point in the history
…-errormsg-fmu

Print the name of the FMU in errormsg - canBeInstantiatedOnlyOncePerProcess
  • Loading branch information
markaren authored Jun 18, 2019
2 parents c6ab495 + 0851f2a commit f47cdaa
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 f47cdaa

Please sign in to comment.