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

◆ ThrowNotSupportedException() [1/2]

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

Definition at line 1006 of file ThrowHelper.cs.

1007 {
1008 string text = ex.Message;
1009 Type type = state.Current.JsonPropertyInfo?.RuntimePropertyType;
1010 if (type == null)
1011 {
1012 type = state.Current.JsonTypeInfo.Type;
1013 }
1014 if (!text.Contains(type.ToString()))
1015 {
1016 if (text.Length > 0)
1017 {
1018 text += " ";
1019 }
1021 }
1022 long lineNumber = reader.CurrentState._lineNumber;
1023 long bytePositionInLine = reader.CurrentState._bytePositionInLine;
1024 text += $" Path: {state.JsonPath()} | LineNumber: {lineNumber} | BytePositionInLine: {bytePositionInLine}.";
1025 throw new NotSupportedException(text, ex);
1026 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string SerializationNotSupportedParentType
Definition SR.cs:248
Definition SR.cs:7

References System.Text.Json.Dictionary, System.SR.Format(), System.SR.SerializationNotSupportedParentType, System.state, System.text, and System.type.

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