Skip to content

Commit

Permalink
Improved error message for #2517
Browse files Browse the repository at this point in the history
  • Loading branch information
mwetter committed May 28, 2021
1 parent e7928f4 commit 10b353a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,15 @@ void getVariables(FMUBuilding* bui, const char* modelicaInstanceName, spawnReals

status = fmi2_import_get_real(bui->fmu, ptrReals->valRefs, ptrReals->n, ptrReals->valsEP);
if (status != (fmi2_status_t)fmi2OK) {
bui->SpawnFormatError("Failed to get variables for %s\n",
modelicaInstanceName);
if (bui->mode == initializationMode){
bui->SpawnFormatError(
"Failed to get parameter values for %s. This may be due to an error during the initialization or warm-up of EnergyPlus as the EnergyPlus FMU has been generated and loaded with no error.\n",
modelicaInstanceName, fmuModeToString(bui->mode));
}
else{
bui->SpawnFormatError("Failed to get variables for %s during mode = %s.\n",
modelicaInstanceName, fmuModeToString(bui->mode));
}
}
/* Set SI unit value */
for(i = 0; i < ptrReals->n; i++){
Expand Down

0 comments on commit 10b353a

Please sign in to comment.