DFix the code
Merge pull request #443 from Geod24/dfix-code

DFix the code
Avoid catching Error instances in various places. See #443.
Avoid awkward mixture of format() and string concatenation.