Improve exception handling.
3 files changed