Added exceptionHandling.