Log an exception properly in Parser