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