handle exceptions in params