29 references to ParsingError
Microsoft.Analyzers.Local (19)
ApiLifecycle\Json\JsonParseException.cs (8)
30
public
ParsingError
Error { get; }
36
: base(GetMessage(
ParsingError
.Unknown))
45
public JsonParseException(
ParsingError
type, TextPosition position)
56
public JsonParseException(string message,
ParsingError
error, TextPosition position)
63
private static string GetMessage(
ParsingError
type)
67
ParsingError
.IncompleteMessage => "The string ended before a value could be parsed.",
68
ParsingError
.InvalidOrUnexpectedCharacter => "The parser encountered an invalid or unexpected character.",
69
ParsingError
.DuplicateObjectKeys => "The parser encountered a JsonObject with duplicate keys.",
ApiLifecycle\Json\JsonReader.cs (7)
82
ParsingError
.InvalidOrUnexpectedCharacter,
194
ParsingError
.InvalidOrUnexpectedCharacter,
207
ParsingError
.InvalidOrUnexpectedCharacter,
241
ParsingError
.InvalidOrUnexpectedCharacter,
285
ParsingError
.DuplicateObjectKeys,
320
ParsingError
.InvalidOrUnexpectedCharacter,
375
ParsingError
.InvalidOrUnexpectedCharacter,
ApiLifecycle\Json\TextScanner.cs (4)
52
throw new JsonParseException(
ParsingError
.IncompleteMessage, Position);
68
throw new JsonParseException(
ParsingError
.IncompleteMessage, Position);
117
ParsingError
.InvalidOrUnexpectedCharacter,
153
ParsingError
.InvalidOrUnexpectedCharacter,
Microsoft.Analyzers.Local.Tests (10)
Json\JsonParseExceptionTest.cs (1)
17
Assert.Equal(
ParsingError
.Unknown, ex.Error);
Json\JsonReaderTest.cs (4)
71
Assert.Equal(
ParsingError
.InvalidOrUnexpectedCharacter, ex.Error);
76
Assert.Equal(
ParsingError
.InvalidOrUnexpectedCharacter, ex.Error);
81
Assert.Equal(
ParsingError
.InvalidOrUnexpectedCharacter, ex.Error);
90
Assert.Equal(
ParsingError
.InvalidOrUnexpectedCharacter, ex.Error);
Json\JsonScannerTest.cs (5)
19
Assert.Equal(
ParsingError
.InvalidOrUnexpectedCharacter, ex.Error);
24
Assert.Equal(
ParsingError
.IncompleteMessage, ex.Error);
34
Assert.Equal(
ParsingError
.InvalidOrUnexpectedCharacter, ex.Error);
41
Assert.Equal(
ParsingError
.IncompleteMessage, ex.Error);
45
Assert.Equal(
ParsingError
.IncompleteMessage, ex.Error);