When G4UnitDefinition::GetValueOf(const G4String& str) is asked for the value of a unit that does not exist, it prints a non-fatal warning and returns 0. This is pretty much guaranteed to give wrong simulation results, so it really should be a fatal exception, or some other hard, simulation-stopping exception. The only reason I can think of for not making it fatal is that there is currently no other simple way to query whether a unit exists in the table. This could be easily remedied. Note bugs #1535 and #1842 are similar but a little different, since those bug reports both request that a check for invalid units be added. (E.g., "km" for an energy.) Here the request is for a general hard failure in the case of completely unrecognized units, since multiplying by 0 is never a desirable unit conversion.
I agree with the suggestion. I submitted the change to the current development branch and will be included in the next release. Thanks.