G4UIcmdWith3VectorAndUnit and G4UIcmdWithADoubleAndUnit behave incorrectly when incorrect unit is specified. For example of a particle gun command /gun/energy 10 km is accepted without any warning message and sets the energy to 10000 GeV. The fix will be included in Geant4 version 10.0, and will potentially be back-ported.
The fix will be included in Geant4 version 10.0, and will potentially be back-ported.