diff --git a/DDSim/DD4hepSimulation.py b/DDSim/DD4hepSimulation.py
index 2998a585b9d5acc2e6a6a47f1184f9414f64892e..0cf75503aeed8c11dab8c073b7923a778f7041b3 100644
--- a/DDSim/DD4hepSimulation.py
+++ b/DDSim/DD4hepSimulation.py
@@ -316,6 +316,9 @@ class DD4hepSimulation(object):
       elif inputFile.endswith(".hepmc"):
         gen = DDG4.GeneratorAction(kernel,"Geant4InputAction/hepmc1")
         gen.Input="Geant4EventReaderHepMC|"+inputFile
+      else:
+        ##this should never happen because we already check at the top, but in case of some LogicError...
+        raise RuntimeError( "Unknown input file type: %s" % inputFile )
       gen.Sync = self.skipNEvents
       gen.Mask = index
       actionList.append(gen)