handled a critical TypeError exception