handle exceptions in user provided continue funciton