Skip to content

Commit 1b6fe85

Browse files
committed
-Fix exception message spelling mistake
1 parent f7cc6ab commit 1b6fe85

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Src/Newtonsoft.Json.Tests/JsonConvertTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public void ObjectToString()
257257
}
258258

259259
[Test]
260-
[ExpectedException(typeof(JsonReaderException), ExpectedMessage = "After parsing a value an unexpected character was encoutered: t. Line 1, position 20.")]
260+
[ExpectedException(typeof(JsonReaderException), ExpectedMessage = "After parsing a value an unexpected character was encountered: t. Line 1, position 20.")]
261261
public void TestInvalidStrings()
262262
{
263263
string orig = @"this is a string ""that has quotes"" ";

Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private void WriteTokenInternal(BsonToken t)
5858
foreach (BsonToken c in value)
5959
{
6060
_writer.Write((sbyte)c.Type);
61-
WriteString(index.ToString(CultureInfo.InvariantCulture), Encoding.GetByteCount(index.ToString(CultureInfo.InvariantCulture)), null);
61+
WriteString(index.ToString(CultureInfo.InvariantCulture), MathUtils.IntLength(index), null);
6262
WriteTokenInternal(c);
6363
index++;
6464
}

Src/Newtonsoft.Json/JsonTextReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ private bool ParsePostValue(char currentChar)
409409
}
410410
else
411411
{
412-
throw CreateJsonReaderException("After parsing a value an unexpected character was encoutered: {0}. Line {1}, position {2}.", currentChar, _currentLineNumber, _currentLinePosition);
412+
throw CreateJsonReaderException("After parsing a value an unexpected character was encountered: {0}. Line {1}, position {2}.", currentChar, _currentLineNumber, _currentLinePosition);
413413
}
414414
break;
415415
}

0 commit comments

Comments
 (0)