Skip to content

Commit

Permalink
Geant4Handle: correct error message when casting does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed May 16, 2024
1 parent 1550d70 commit adc1399
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DDG4/src/Geant4Handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ namespace dd4hep {
if (ptr) {
return ptr;
}
except("Geant4Handle", "Failed to convert object of type %s to handle of type %s!",
typ.first.c_str(),typ.second.c_str());
std::string _t = typeName(typeid(TYPE));
except("Geant4Handle", "Failed to convert object of type '%s' with name '%s' to handle of type '%s'!",
typ.first.c_str(),typ.second.c_str(),_t.c_str());
}
except("Geant4Handle", "Failed to create object of type %s!", typ.first.c_str());
return 0;
Expand Down

0 comments on commit adc1399

Please sign in to comment.