Fixed exception handling closes #2009

Small tweak @oxtoacart if you can take a look. Merging to new release-1.5.14 branch.