From 0851f2aca439434882ed41f0f68f48e6474cfa12 Mon Sep 17 00:00:00 2001 From: Lars Ivar Hatledal Date: Mon, 17 Jun 2019 12:15:52 +0200 Subject: [PATCH] Print the name of the FMU in errormsg --- src/cpp/fmi/v1/fmu.cpp | 2 +- src/cpp/fmi/v2/fmu.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/fmi/v1/fmu.cpp b/src/cpp/fmi/v1/fmu.cpp index 556c1125f..6bea8bc6c 100644 --- a/src/cpp/fmi/v1/fmu.cpp +++ b/src/cpp/fmi/v1/fmu.cpp @@ -133,7 +133,7 @@ std::shared_ptr 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( new slave_instance(shared_from_this(), instanceName)); diff --git a/src/cpp/fmi/v2/fmu.cpp b/src/cpp/fmi/v2/fmu.cpp index c26cfc14c..12d94a7c5 100644 --- a/src/cpp/fmi/v2/fmu.cpp +++ b/src/cpp/fmi/v2/fmu.cpp @@ -133,7 +133,7 @@ std::shared_ptr 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( new slave_instance(shared_from_this(), instanceName));