217 references to XmlExceptionHelper
System.Private.DataContractSerialization (217)
System\Runtime\Serialization\DateTimeOffsetAdapter.cs (1)
58throw XmlExceptionHelper.CreateConversionException(value.ToString(CultureInfo.InvariantCulture), "DateTimeOffset", exception);
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (8)
178throw XmlExceptionHelper.CreateConversionException(ticksvalue.ToString(), "Int64", exception); 200throw XmlExceptionHelper.CreateConversionException(ticksvalue.ToString(), "DateTime", exception); 275throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception); 279throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception); 283throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception); 308throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception); 312throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception); 316throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception);
System\Runtime\Serialization\Json\XmlJsonReader.cs (24)
491XmlExceptionHelper.ThrowXmlException(this, 548XmlExceptionHelper.ThrowXmlException(this, 589XmlExceptionHelper.ThrowXmlException(this, 603XmlExceptionHelper.ThrowTokenExpected(this, "false", Encoding.UTF8.GetString(buffer, offset, 5)); 611XmlExceptionHelper.ThrowTokenExpected(this, "false", Encoding.UTF8.GetString(buffer, offset, 4) + (char)ch); 624XmlExceptionHelper.ThrowTokenExpected(this, "true", Encoding.UTF8.GetString(buffer, offset, 4)); 632XmlExceptionHelper.ThrowTokenExpected(this, "true", Encoding.UTF8.GetString(buffer, offset, 4) + (char)ch); 645XmlExceptionHelper.ThrowTokenExpected(this, "null", Encoding.UTF8.GetString(buffer, offset, 4)); 658XmlExceptionHelper.ThrowTokenExpected(this, "null", Encoding.UTF8.GetString(buffer, offset, 4) + (char)ch); 677XmlExceptionHelper.ThrowXmlException(this, 693throw XmlExceptionHelper.CreateConversionException(value, "decimal", exception); 711throw XmlExceptionHelper.CreateConversionException(value, "Int64", exception); 938throw XmlExceptionHelper.CreateConversionException(value.ToString(), "char", exception); 950throw XmlExceptionHelper.CreateConversionException(value.ToString(), "Int32", exception); 1117XmlExceptionHelper.ThrowTokenExpected(this, "\"", (char)ch); 1161XmlExceptionHelper.ThrowXmlException(this, 1180XmlExceptionHelper.ThrowXmlException(this, 1212XmlExceptionHelper.ThrowXmlException(this, 1262XmlExceptionHelper.ThrowXmlException(this, 1306XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.JsonInvalidFFFE)); 1411XmlExceptionHelper.ThrowTokenExpected(this, "\"", (char)ch); 1522XmlExceptionHelper.ThrowTokenExpected(this, ((char)characterToSkip).ToString(), (char)BufferReader.GetByte()); 1573XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, val[i]))); 1601XmlExceptionHelper.ThrowXmlException(this,
System\Runtime\Serialization\XmlReaderDelegator.cs (12)
488throw XmlExceptionHelper.CreateConversionException(str, "byte[]", exception); 492throw XmlExceptionHelper.CreateConversionException(str, "byte[]", exception); 689throw XmlExceptionHelper.CreateConversionException(str, "Guid", exception); 693throw XmlExceptionHelper.CreateConversionException(str, "Guid", exception); 697throw XmlExceptionHelper.CreateConversionException(str, "Guid", exception); 710throw XmlExceptionHelper.CreateConversionException(str, "Guid", exception); 714throw XmlExceptionHelper.CreateConversionException(str, "Guid", exception); 718throw XmlExceptionHelper.CreateConversionException(str, "Guid", exception); 734throw XmlExceptionHelper.CreateConversionException(str, "Uri", exception); 738throw XmlExceptionHelper.CreateConversionException(str, "Uri", exception); 751throw XmlExceptionHelper.CreateConversionException(str, "Uri", exception); 755throw XmlExceptionHelper.CreateConversionException(str, "Uri", exception);
System\Xml\ArrayHelper.cs (2)
21XmlExceptionHelper.ThrowMaxArrayLengthOrMaxItemsQuotaExceeded(reader, maxArrayLength); 42XmlExceptionHelper.ThrowMaxArrayLengthOrMaxItemsQuotaExceeded(reader, maxArrayLength);
System\Xml\ValueHandle.cs (1)
787throw XmlExceptionHelper.CreateEncodingException(bytes, byteOffset, byteCount, exception);
System\Xml\XmlBaseReader.cs (27)
130XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlDeclMissingVersion)); 133XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 137XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlDeclMissingVersion)); 146XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 150XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 163XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 169XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidStandalone)); 178XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 184XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(valueSR))); 242XmlExceptionHelper.ThrowInvalidBinaryFormat(this); 252XmlExceptionHelper.ThrowUnexpectedEndOfFile(this); 261XmlExceptionHelper.ThrowMultipleRootElements(this); 267XmlExceptionHelper.ThrowMaxDepthExceeded(this, _quotas.MaxDepth); 294XmlExceptionHelper.ThrowUnexpectedEndElement(this); 344XmlExceptionHelper.ThrowEmptyNamespace(this); 349XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.XmlSpecificBindingPrefix, "xml", xmlNamespace))); 353XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.XmlSpecificBindingPrefix, "xmlns", xmlnsNamespace))); 687XmlExceptionHelper.ThrowUndefinedPrefix(this, PrefixHandle.GetString(prefix)); 695XmlExceptionHelper.ThrowUndefinedPrefix(this, prefix.GetString()); 743XmlExceptionHelper.ThrowDuplicateAttribute(this, attributeNode1.Prefix.GetString(), attributeNode2.Prefix.GetString(), attributeNode1.LocalName.GetString(), attributeNode1.Namespace.Uri.GetString()); 754XmlExceptionHelper.ThrowDuplicateAttribute(this, xmlns, xmlns, attributeNode1.Namespace.Prefix.GetString(), xmlnsNamespace); 776XmlExceptionHelper.ThrowDuplicateXmlnsAttribute(this, attributeNodes[attribute1].Namespace.Prefix.GetString(), xmlnsNamespace); 778XmlExceptionHelper.ThrowDuplicateAttribute(this, attributeNodes[attribute1].Prefix.GetString(), attributeNodes[attribute2].Prefix.GetString(), attributeNodes[attribute1].LocalName.GetString(), attributeNodes[attribute1].Namespace.Uri.GetString()); 1257XmlExceptionHelper.ThrowEndElementExpected(this, elementNode.LocalName.GetString(), elementNode.Namespace.Uri.GetString()); 1305XmlExceptionHelper.ThrowMaxArrayLengthExceeded(this, _quotas.MaxArrayLength); 1537XmlExceptionHelper.ThrowMaxStringContentLengthExceeded(this, _quotas.MaxStringContentLength); 3139XmlExceptionHelper.ThrowMaxNameTableCharCountExceeded(_reader, _maxCharCount);
System\Xml\XmlBinaryReader.cs (10)
113XmlExceptionHelper.ThrowMaxStringContentLengthExceeded(this, Quotas.MaxStringContentLength); 705XmlExceptionHelper.ThrowInvalidBinaryFormat(this); 856XmlExceptionHelper.ThrowMaxBytesPerReadExceeded(this, _maxBytesPerRead); 928XmlExceptionHelper.ThrowInvalidBinaryFormat(this); 1121XmlExceptionHelper.ThrowInvalidBinaryFormat(this); 1124XmlExceptionHelper.ThrowInvalidBinaryFormat(this); 1126XmlExceptionHelper.ThrowInvalidBinaryFormat(this); 1129XmlExceptionHelper.ThrowInvalidBinaryFormat(this); 1133XmlExceptionHelper.ThrowInvalidBinaryFormat(this); 1137XmlExceptionHelper.ThrowInvalidBinaryFormat(this);
System\Xml\XmlBufferReader.cs (32)
186XmlExceptionHelper.ThrowUnexpectedEndOfFile(_reader); 206XmlExceptionHelper.ThrowUnexpectedEndOfFile(_reader); 340XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader); 368XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader); 431throw XmlExceptionHelper.CreateConversionException(value.ToString(CultureInfo.InvariantCulture), "DateTime", exception); 435throw XmlExceptionHelper.CreateConversionException(value.ToString(CultureInfo.InvariantCulture), "DateTime", exception); 439throw XmlExceptionHelper.CreateConversionException(value.ToString(CultureInfo.InvariantCulture), "DateTime", exception); 453throw XmlExceptionHelper.CreateConversionException(value.ToString(CultureInfo.InvariantCulture), "TimeSpan", exception); 457throw XmlExceptionHelper.CreateConversionException(value.ToString(CultureInfo.InvariantCulture), "TimeSpan", exception); 461throw XmlExceptionHelper.CreateConversionException(value.ToString(CultureInfo.InvariantCulture), "TimeSpan", exception); 645XmlExceptionHelper.ThrowInvalidCharRef(_reader); 657XmlExceptionHelper.ThrowInvalidCharRef(_reader); 671XmlExceptionHelper.ThrowInvalidCharRef(_reader); 684XmlExceptionHelper.ThrowInvalidCharRef(_reader); 698XmlExceptionHelper.ThrowInvalidCharRef(_reader); 714XmlExceptionHelper.ThrowInvalidCharRef(_reader); 717XmlExceptionHelper.ThrowInvalidCharRef(_reader); 735XmlExceptionHelper.ThrowInvalidCharRef(_reader); 739XmlExceptionHelper.ThrowInvalidCharRef(_reader); 747XmlExceptionHelper.ThrowInvalidCharRef(_reader); 770XmlExceptionHelper.ThrowInvalidCharRef(_reader); 1050XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader); 1061XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader); 1066XmlExceptionHelper.ThrowXmlDictionaryStringIDOutOfRange(_reader); 1067XmlExceptionHelper.ThrowXmlDictionaryStringIDUndefinedSession(_reader, sessionKey); 1073XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader); 1078XmlExceptionHelper.ThrowXmlDictionaryStringIDOutOfRange(_reader); 1079XmlExceptionHelper.ThrowXmlDictionaryStringIDUndefinedStatic(_reader, staticKey); 1181XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader); 1195XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader); 1209XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader); 1223XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader);
System\Xml\XmlConverter.cs (35)
45throw XmlExceptionHelper.CreateConversionException(value, "Boolean", exception); 49throw XmlExceptionHelper.CreateConversionException(value, "Boolean", exception); 74throw XmlExceptionHelper.CreateConversionException(value, "Int32", exception); 78throw XmlExceptionHelper.CreateConversionException(value, "Int32", exception); 82throw XmlExceptionHelper.CreateConversionException(value, "Int32", exception); 102throw XmlExceptionHelper.CreateConversionException(value, "Int64", exception); 106throw XmlExceptionHelper.CreateConversionException(value, "Int64", exception); 110throw XmlExceptionHelper.CreateConversionException(value, "Int64", exception); 130throw XmlExceptionHelper.CreateConversionException(value, "float", exception); 134throw XmlExceptionHelper.CreateConversionException(value, "float", exception); 138throw XmlExceptionHelper.CreateConversionException(value, "float", exception); 158throw XmlExceptionHelper.CreateConversionException(value, "double", exception); 162throw XmlExceptionHelper.CreateConversionException(value, "double", exception); 166throw XmlExceptionHelper.CreateConversionException(value, "double", exception); 186throw XmlExceptionHelper.CreateConversionException(value, "decimal", exception); 190throw XmlExceptionHelper.CreateConversionException(value, "decimal", exception); 194throw XmlExceptionHelper.CreateConversionException(value, "decimal", exception); 211throw XmlExceptionHelper.CreateConversionException(ToString(value), "DateTime", exception); 223throw XmlExceptionHelper.CreateConversionException(value, "DateTime", exception); 227throw XmlExceptionHelper.CreateConversionException(value, "DateTime", exception); 247throw XmlExceptionHelper.CreateConversionException(value, "UniqueId", exception); 251throw XmlExceptionHelper.CreateConversionException(value, "UniqueId", exception); 268throw XmlExceptionHelper.CreateConversionException(value, "TimeSpan", exception); 272throw XmlExceptionHelper.CreateConversionException(value, "TimeSpan", exception); 276throw XmlExceptionHelper.CreateConversionException(value, "TimeSpan", exception); 293throw XmlExceptionHelper.CreateConversionException(value, "Guid", exception); 297throw XmlExceptionHelper.CreateConversionException(value, "Guid", exception); 301throw XmlExceptionHelper.CreateConversionException(value, "Guid", exception); 318throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception); 322throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception); 326throw XmlExceptionHelper.CreateConversionException(value, "UInt64", exception); 343throw XmlExceptionHelper.CreateEncodingException(buffer, offset, count, exception); 355throw XmlExceptionHelper.CreateEncodingException(buffer, offset, count, exception); 368throw XmlExceptionHelper.CreateEncodingException(value, exception); 380throw XmlExceptionHelper.CreateEncodingException(buffer, offset, count, exception);
System\Xml\XmlDictionaryReader.cs (43)
199XmlExceptionHelper.ThrowStartElementExpected(this); 205XmlExceptionHelper.ThrowStartElementExpected(this, name); 211XmlExceptionHelper.ThrowStartElementExpected(this, localName, namespaceUri); 217XmlExceptionHelper.ThrowStartElementExpected(this, localName, namespaceUri); 250XmlExceptionHelper.ThrowFullStartElementExpected(this); 258XmlExceptionHelper.ThrowFullStartElementExpected(this, name); 266XmlExceptionHelper.ThrowFullStartElementExpected(this, localName, namespaceUri); 274XmlExceptionHelper.ThrowFullStartElementExpected(this, localName, namespaceUri); 362XmlExceptionHelper.ThrowMaxArrayLengthExceeded(this, maxByteArrayContentLength); 372XmlExceptionHelper.ThrowBase64DataExpected(this); 412XmlExceptionHelper.ThrowMaxStringContentLengthExceeded(this, maxStringContentLength); 444XmlExceptionHelper.ThrowMaxStringContentLengthExceeded(this, maxStringContentLength); 481XmlExceptionHelper.ThrowMaxStringContentLengthExceeded(this, maxStringContentLength); 490XmlExceptionHelper.ThrowMaxStringContentLengthExceeded(this, maxStringContentLength); 529XmlExceptionHelper.ThrowMaxArrayLengthExceeded(this, maxByteArrayContentLength); 680XmlExceptionHelper.ThrowUndefinedPrefix(this, prefix); 838throw XmlExceptionHelper.CreateConversionException(string.Empty, "DateTime", exception); 842throw XmlExceptionHelper.CreateConversionException(string.Empty, "DateTime", exception); 869throw XmlExceptionHelper.CreateConversionException(string.Empty, "UniqueId", exception); 873throw XmlExceptionHelper.CreateConversionException(string.Empty, "UniqueId", exception); 900throw XmlExceptionHelper.CreateConversionException(string.Empty, "Guid", exception); 904throw XmlExceptionHelper.CreateConversionException(string.Empty, "Guid", exception); 908throw XmlExceptionHelper.CreateConversionException(string.Empty, "Guid", exception); 1076XmlExceptionHelper.ThrowConversionOverflow(this, i.ToString(NumberFormatInfo.CurrentInfo), "Int16"); 1663throw XmlExceptionHelper.CreateConversionException(nameof(Boolean), exception); 1667throw XmlExceptionHelper.CreateConversionException(nameof(Boolean), exception); 1684throw XmlExceptionHelper.CreateConversionException(nameof(Decimal), exception); 1688throw XmlExceptionHelper.CreateConversionException(nameof(Decimal), exception); 1692throw XmlExceptionHelper.CreateConversionException(nameof(Decimal), exception); 1704throw XmlExceptionHelper.CreateConversionException(nameof(Double), exception); 1708throw XmlExceptionHelper.CreateConversionException(nameof(Double), exception); 1712throw XmlExceptionHelper.CreateConversionException(nameof(Double), exception); 1724throw XmlExceptionHelper.CreateConversionException(nameof(Int32), exception); 1728throw XmlExceptionHelper.CreateConversionException(nameof(Int32), exception); 1732throw XmlExceptionHelper.CreateConversionException(nameof(Int32), exception); 1744throw XmlExceptionHelper.CreateConversionException(nameof(Int64), exception); 1748throw XmlExceptionHelper.CreateConversionException(nameof(Int64), exception); 1752throw XmlExceptionHelper.CreateConversionException(nameof(Int64), exception); 1764throw XmlExceptionHelper.CreateConversionException(nameof(Single), exception); 1768throw XmlExceptionHelper.CreateConversionException(nameof(Single), exception); 1772throw XmlExceptionHelper.CreateConversionException(nameof(Single), exception); 1784throw XmlExceptionHelper.CreateConversionException(nameof(String), exception); 1788throw XmlExceptionHelper.CreateConversionException(nameof(String), exception);
System\Xml\XmlUTF8TextReader.cs (22)
616XmlExceptionHelper.ThrowProcessingInstructionNotSupported(this); 621XmlExceptionHelper.ThrowDeclarationNotFirst(this); 646XmlExceptionHelper.ThrowTokenExpected(this, "?>", Encoding.UTF8.GetString(buffer, offset, 2)); 662XmlExceptionHelper.ThrowXmlException(this, exception); 770XmlExceptionHelper.ThrowTokenExpected(this, "=", (char)BufferReader.GetByte()); 779XmlExceptionHelper.ThrowTokenExpected(this, "\"", (char)BufferReader.GetByte()); 813XmlExceptionHelper.ThrowTokenExpected(this, ((char)quoteChar).ToString(), (char)ch); 866XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlSpaceBetweenAttributes)); 870XmlExceptionHelper.ThrowMaxBytesPerReadExceeded(this, _maxBytesPerRead); 899XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidFFFE)); 969XmlExceptionHelper.ThrowTokenExpected(this, ">", (char)BufferReader.GetByte()); 987XmlExceptionHelper.ThrowTagMismatch(this, elementNode.Prefix.GetString(), elementNode.LocalName.GetString(), _prefix.GetString(), _localName.GetString()); 995XmlExceptionHelper.ThrowTokenExpected(this, ">", (char)BufferReader.GetByte()); 1005XmlExceptionHelper.ThrowTokenExpected(this, "--", (char)BufferReader.GetByte()); 1020XmlExceptionHelper.ThrowInvalidXml(this, b); 1035XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidCommentChars)); 1056XmlExceptionHelper.ThrowTokenExpected(this, "[CDATA[", Encoding.UTF8.GetString(buffer, offset, 7)); 1168XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidFFFE)); 1326XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlCDATAInvalidAtTopLevel)); 1342XmlExceptionHelper.ThrowInvalidRootData(this); 1369XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlCloseCData)); 1381XmlExceptionHelper.ThrowInvalidXml(this, ch);