Improved exceptionHandling.