internal static void ThrowParse(Exception ex, XObject xObj, string typeStr)
{
if (ex is FormatException || ex is OverflowException) {
// FormatException also thrown when string is empty
string message = "Could not parse " + typeStr + " in XML item: " + xObj.ToString ();
ThrowXmlExceptionWithLineInfo (message, ex, xObj);
}
}