未验证 提交 3058fa47 编写于 作者: M Marek Safar 提交者: GitHub

Replace name with type and codepage in EncodingConversionOverflow exception (#62910)

上级 cab2fd80
......@@ -1021,10 +1021,10 @@
<value>Must complete Convert() operation or call Encoder.Reset() before calling GetBytes() or GetByteCount(). Encoder '{0}' fallback '{1}'.</value>
</data>
<data name="Argument_EncodingConversionOverflowBytes" xml:space="preserve">
<value>The output byte buffer is too small to contain the encoded data, encoding '{0}' fallback '{1}'.</value>
<value>The output byte buffer is too small to contain the encoded data, encoding codepage '{0}' and fallback '{1}'.</value>
</data>
<data name="Argument_EncodingConversionOverflowChars" xml:space="preserve">
<value>The output char buffer is too small to contain the decoded characters, encoding '{0}' fallback '{1}'.</value>
<value>The output char buffer is too small to contain the decoded characters, encoding codepage '{0}' and fallback '{1}'.</value>
</data>
<data name="Argument_EncodingNotSupported" xml:space="preserve">
<value>'{0}' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.</value>
......
......@@ -1140,7 +1140,7 @@ public static Stream CreateTranscodingStream(Stream innerStream, Encoding innerS
// Special message to include fallback type in case fallback's GetMaxCharCount is broken
// This happens if user has implemented an encoder fallback with a broken GetMaxCharCount
throw new ArgumentException(
SR.Format(SR.Argument_EncodingConversionOverflowBytes, EncodingName, EncoderFallback.GetType()), "bytes");
SR.Format(SR.Argument_EncodingConversionOverflowBytes, _codePage, EncoderFallback.GetType()), "bytes");
internal void ThrowBytesOverflow(EncoderNLS? encoder, bool nothingEncoded)
{
......@@ -1168,7 +1168,7 @@ internal void ThrowBytesOverflow(EncoderNLS? encoder, bool nothingEncoded)
// Special message to include fallback type in case fallback's GetMaxCharCount is broken
// This happens if user has implemented a decoder fallback with a broken GetMaxCharCount
throw new ArgumentException(
SR.Format(SR.Argument_EncodingConversionOverflowChars, EncodingName, DecoderFallback.GetType()), "chars");
SR.Format(SR.Argument_EncodingConversionOverflowChars, _codePage, DecoderFallback.GetType()), "chars");
internal void ThrowCharsOverflow(DecoderNLS? decoder, bool nothingDecoded)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册