This hasn't been considered a best practice since the age of the typewriter. https://english.stackexchange.com/questions/2544/how-many-spaces-should-come-after-a-period-full-stop
Having these throw is terrible for ergonomics and there are loads of places where the exception was either silently ignored or not handled at all. Having a function which returns an optional and another that returns a default works a lot better imo.