8 instantiations of InputFormatterException
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
ModelBinding\ModelStateDictionaryTest.cs (2)
1210var exception = new InputFormatterException(expectedMessage); 1251dictionary.TryAddModelError("key", new InputFormatterException(expectedMessage), metadata);
Microsoft.AspNetCore.Mvc.Core (1)
Formatters\SystemTextJsonInputFormatter.cs (1)
123return new InputFormatterException(jsonException.Message, jsonException);
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\Binders\BodyModelBinderTests.cs (1)
263throw new InputFormatterException("Bad input!!", expectedFormatException);
Microsoft.AspNetCore.Mvc.Formatters.Xml (3)
XmlDataContractSerializerInputFormatter.cs (1)
161throw new InputFormatterException(Resources.ErrorDeserializingInputData, exception);
XmlSerializerInputFormatter.cs (2)
152throw new InputFormatterException(Resources.ErrorDeserializingInputData, exception.InnerException); 157throw new InputFormatterException(Resources.ErrorDeserializingInputData, exception.InnerException);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonInputFormatter.cs (1)
431return new InputFormatterException(exception.Message, exception);
18 references to InputFormatterException
Microsoft.AspNetCore.Mvc.Abstractions (7)
Formatters\InputFormatterException.cs (3)
12/// Initializes a new instance of <see cref="InputFormatterException"/>. 19/// Initializes a new instance of <see cref="InputFormatterException"/> with the specified <paramref name="message"/>. 28/// Initializes a new instance of <see cref="InputFormatterException"/> with the specified <paramref name="message"/> and
Formatters\InputFormatterExceptionPolicy.cs (2)
29/// treats only <see cref="InputFormatterException"/> and its subclasses as model state errors. This means that 43/// This value indicates that only <see cref="InputFormatterException"/> and subclasses will be treated
ModelBinding\ModelStateDictionary.cs (2)
212if ((exception is InputFormatterException || exception is ValueProviderException) 305else if ((exception is InputFormatterException || exception is ValueProviderException)
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelStateDictionaryTest.cs (1)
1210var exception = new InputFormatterException(expectedMessage);
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\BodyModelBinder.cs (1)
183catch (Exception exception) when (exception is InputFormatterException || ShouldHandleException(formatter))
Properties\AssemblyInfo.cs (1)
8[assembly: TypeForwardedTo(typeof(InputFormatterException))]
Microsoft.AspNetCore.Mvc.Core.Test (1)
Formatters\SystemTextJsonInputFormatterTest.cs (1)
180Assert.IsNotType<InputFormatterException>(modelError.Exception);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (6)
XmlDataContractSerializerInputFormatterTest.cs (4)
426await Assert.ThrowsAsync<InputFormatterException>(async () => await formatter.ReadAsync(context)); 442await Assert.ThrowsAsync<InputFormatterException>(async () => await formatter.ReadAsync(context)); 615await Assert.ThrowsAsync<InputFormatterException>(async () => await formatter.ReadAsync(context)); 674await Assert.ThrowsAsync<InputFormatterException>(async () => await formatter.ReadAsync(context));
XmlSerializerInputFormatterTest.cs (2)
438await Assert.ThrowsAsync<InputFormatterException>(() => formatter.ReadAsync(context)); 459await Assert.ThrowsAsync<InputFormatterException>(() => formatter.ReadAsync(context));
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
NewtonsoftJsonInputFormatterTest.cs (1)
306Assert.IsNotType<InputFormatterException>(modelError.Exception);