refactor with a handleException(Exception e) method and maybe some optional parameters.