changed exception handler to handle all throwables