Added exception handler for the controller