blob: d9c1000af9face0159cd3ad59822a77b24803b21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.AspNetCore.Mvc.ModelBinding
{
/// <summary>
/// The <see cref="Exception"/> that is added to model state when a model binder for the body of the request is
/// unable to understand the request content type header.
/// </summary>
public class UnsupportedContentTypeException : Exception
{
/// <summary>
/// Creates a new instance of <see cref="UnsupportedContentTypeException"/> with the specified
/// exception <paramref name="message"/>.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public UnsupportedContentTypeException(string message)
: base(message)
{
if (message == null)
{
throw new ArgumentNullException(nameof(message));
}
}
}
}
|