better diagnostic exception