Improve exception information when deserializing IR