Use if-statement instead of try-catch block in emitAbruptCompletion.