CAS-1335: Refactored exception handling logic to use new instances rather than static throws.