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

◆ AddJsonExceptionInformation() [1/2]

static void System.Text.Json.ThrowHelper.AddJsonExceptionInformation ( ref ReadStack state,
in Utf8JsonReader reader,
JsonException ex )
inlinestatic

Definition at line 922 of file ThrowHelper.cs.

923 {
924 long lineNumber = reader.CurrentState._lineNumber;
925 ex.LineNumber = lineNumber;
926 long bytePositionInLine = reader.CurrentState._bytePositionInLine;
928 string value = (ex.Path = state.JsonPath());
929 string text2 = ex._message;
930 if (string.IsNullOrEmpty(text2))
931 {
932 Type type = state.Current.JsonPropertyInfo?.RuntimePropertyType;
933 if (type == null)
934 {
935 type = state.Current.JsonTypeInfo?.Type;
936 }
939 }
940 if (ex.AppendPathInformation)
941 {
942 text2 += $" Path: {value} | LineNumber: {lineNumber} | BytePositionInLine: {bytePositionInLine}.";
943 ex.SetMessage(text2);
944 }
945 }
static string DeserializeUnableToConvertValue
Definition SR.cs:130
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.SR.DeserializeUnableToConvertValue, System.Text.Json.Dictionary, System.SR.Format(), System.state, System.type, and System.value.

Referenced by System.Text.Json.Serialization.JsonConverter< T >.ReadCore(), System.Text.Json.ThrowHelper.ReThrowWithPath(), System.Text.Json.ThrowHelper.ReThrowWithPath(), and System.Text.Json.Serialization.JsonConverter< T >.WriteCore().