Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetResourceString() [2/2]

static string System.Text.Json.ThrowHelper.GetResourceString ( ref Utf8JsonReader json,
ExceptionResource resource,
byte nextByte,
string characters )
inlinestaticprivate

Definition at line 286 of file ThrowHelper.cs.

287 {
289 string result = "";
290 switch (resource)
291 {
292 case ExceptionResource.ArrayDepthTooLarge:
293 result = System.SR.Format(System.SR.ArrayDepthTooLarge, json.CurrentState.Options.MaxDepth);
294 break;
295 case ExceptionResource.MismatchedObjectArray:
297 break;
298 case ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd:
300 break;
301 case ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd:
303 break;
304 case ExceptionResource.EndOfStringNotFound:
306 break;
307 case ExceptionResource.RequiredDigitNotFoundAfterSign:
309 break;
310 case ExceptionResource.RequiredDigitNotFoundAfterDecimal:
312 break;
313 case ExceptionResource.RequiredDigitNotFoundEndOfData:
315 break;
316 case ExceptionResource.ExpectedEndAfterSingleJson:
318 break;
319 case ExceptionResource.ExpectedEndOfDigitNotFound:
321 break;
322 case ExceptionResource.ExpectedNextDigitEValueNotFound:
324 break;
325 case ExceptionResource.ExpectedSeparatorAfterPropertyNameNotFound:
327 break;
328 case ExceptionResource.ExpectedStartOfPropertyNotFound:
330 break;
331 case ExceptionResource.ExpectedStartOfPropertyOrValueNotFound:
333 break;
334 case ExceptionResource.ExpectedStartOfPropertyOrValueAfterComment:
336 break;
337 case ExceptionResource.ExpectedStartOfValueNotFound:
339 break;
340 case ExceptionResource.ExpectedValueAfterPropertyNameNotFound:
342 break;
343 case ExceptionResource.FoundInvalidCharacter:
345 break;
346 case ExceptionResource.InvalidEndOfJsonNonPrimitive:
348 break;
349 case ExceptionResource.ObjectDepthTooLarge:
350 result = System.SR.Format(System.SR.ObjectDepthTooLarge, json.CurrentState.Options.MaxDepth);
351 break;
352 case ExceptionResource.ExpectedFalse:
353 result = System.SR.Format(System.SR.ExpectedFalse, characters);
354 break;
355 case ExceptionResource.ExpectedNull:
356 result = System.SR.Format(System.SR.ExpectedNull, characters);
357 break;
358 case ExceptionResource.ExpectedTrue:
359 result = System.SR.Format(System.SR.ExpectedTrue, characters);
360 break;
361 case ExceptionResource.InvalidCharacterWithinString:
363 break;
364 case ExceptionResource.InvalidCharacterAfterEscapeWithinString:
366 break;
367 case ExceptionResource.InvalidHexCharacterWithinString:
369 break;
370 case ExceptionResource.EndOfCommentNotFound:
372 break;
373 case ExceptionResource.ZeroDepthAtEnd:
375 break;
376 case ExceptionResource.ExpectedJsonTokens:
378 break;
379 case ExceptionResource.NotEnoughData:
380 result = System.SR.NotEnoughData;
381 break;
382 case ExceptionResource.ExpectedOneCompleteToken:
384 break;
385 case ExceptionResource.InvalidCharacterAtStartOfComment:
387 break;
388 case ExceptionResource.UnexpectedEndOfDataWhileReadingComment:
390 break;
391 case ExceptionResource.UnexpectedEndOfLineSeparator:
393 break;
394 case ExceptionResource.InvalidLeadingZeroInNumber:
396 break;
397 }
398 return result;
399 }
static string ExpectedStartOfPropertyNotFound
Definition SR.cs:64
static string InvalidCharacterAfterEscapeWithinString
Definition SR.cs:80
static string TrailingCommaNotAllowedBeforeArrayEnd
Definition SR.cs:148
static string InvalidLeadingZeroInNumber
Definition SR.cs:212
static string ObjectDepthTooLarge
Definition SR.cs:100
static string UnexpectedEndOfDataWhileReadingComment
Definition SR.cs:172
static string InvalidEndOfJsonNonPrimitive
Definition SR.cs:84
static string InvalidCharacterAtStartOfComment
Definition SR.cs:170
static string InvalidCharacterWithinString
Definition SR.cs:82
static string ExpectedTrue
Definition SR.cs:70
static string ExpectedJsonTokens
Definition SR.cs:54
static string RequiredDigitNotFoundAfterDecimal
Definition SR.cs:118
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ArrayDepthTooLarge
Definition SR.cs:14
static string ExpectedSeparatorAfterPropertyNameNotFound
Definition SR.cs:62
static string InvalidHexCharacterWithinString
Definition SR.cs:86
static string ExpectedStartOfPropertyOrValueNotFound
Definition SR.cs:66
static string EndOfStringNotFound
Definition SR.cs:46
static string ExpectedStartOfPropertyOrValueAfterComment
Definition SR.cs:146
static string RequiredDigitNotFoundAfterSign
Definition SR.cs:120
static string ExpectedOneCompleteToken
Definition SR.cs:56
static string EndOfCommentNotFound
Definition SR.cs:44
static string ExpectedFalse
Definition SR.cs:52
static string TrailingCommaNotAllowedBeforeObjectEnd
Definition SR.cs:150
static string NotEnoughData
Definition SR.cs:176
static string RequiredDigitNotFoundEndOfData
Definition SR.cs:122
static string ExpectedNextDigitEValueNotFound
Definition SR.cs:58
static string ExpectedEndOfDigitNotFound
Definition SR.cs:50
static string MismatchedObjectArray
Definition SR.cs:96
static string ExpectedStartOfValueNotFound
Definition SR.cs:68
static string ExpectedEndAfterSingleJson
Definition SR.cs:48
static string ExpectedValueAfterPropertyNameNotFound
Definition SR.cs:72
static string FoundInvalidCharacter
Definition SR.cs:76
static string ZeroDepthAtEnd
Definition SR.cs:128
static string UnexpectedEndOfLineSeparator
Definition SR.cs:178
static string ExpectedNull
Definition SR.cs:60
Definition SR.cs:7
static string GetPrintableString(byte value)

References System.SR.ArrayDepthTooLarge, System.Text.Json.Dictionary, System.SR.EndOfCommentNotFound, System.SR.EndOfStringNotFound, System.SR.ExpectedEndAfterSingleJson, System.SR.ExpectedEndOfDigitNotFound, System.SR.ExpectedFalse, System.SR.ExpectedJsonTokens, System.SR.ExpectedNextDigitEValueNotFound, System.SR.ExpectedNull, System.SR.ExpectedOneCompleteToken, System.SR.ExpectedSeparatorAfterPropertyNameNotFound, System.SR.ExpectedStartOfPropertyNotFound, System.SR.ExpectedStartOfPropertyOrValueAfterComment, System.SR.ExpectedStartOfPropertyOrValueNotFound, System.SR.ExpectedStartOfValueNotFound, System.SR.ExpectedTrue, System.SR.ExpectedValueAfterPropertyNameNotFound, System.SR.Format(), System.SR.FoundInvalidCharacter, System.Text.Json.ThrowHelper.GetPrintableString(), System.SR.InvalidCharacterAfterEscapeWithinString, System.SR.InvalidCharacterAtStartOfComment, System.SR.InvalidCharacterWithinString, System.SR.InvalidEndOfJsonNonPrimitive, System.SR.InvalidHexCharacterWithinString, System.SR.InvalidLeadingZeroInNumber, System.SR.MismatchedObjectArray, System.SR.NotEnoughData, System.SR.ObjectDepthTooLarge, System.SR.RequiredDigitNotFoundAfterDecimal, System.SR.RequiredDigitNotFoundAfterSign, System.SR.RequiredDigitNotFoundEndOfData, System.SR.TrailingCommaNotAllowedBeforeArrayEnd, System.SR.TrailingCommaNotAllowedBeforeObjectEnd, System.SR.UnexpectedEndOfDataWhileReadingComment, System.SR.UnexpectedEndOfLineSeparator, and System.SR.ZeroDepthAtEnd.

Referenced by System.Text.Json.ThrowHelper.GetInvalidOperationException(), and System.Text.Json.ThrowHelper.GetJsonReaderException().