forked from JSONAPIdotNET/JSONAPI.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypeRegistrationNotFoundException.cs
More file actions
28 lines (26 loc) · 973 Bytes
/
Copy pathTypeRegistrationNotFoundException.cs
File metadata and controls
28 lines (26 loc) · 973 Bytes
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
using System;
namespace JSONAPI.Core
{
/// <summary>
/// Exception thrown when a model is looked up for a type that has not been registred
/// </summary>
public class TypeRegistrationNotFoundException : Exception
{
/// <summary>
/// Creates a ModelRegistrationNotFoundException for a type lookup failure
/// </summary>
/// <param name="type"></param>
public TypeRegistrationNotFoundException(Type type)
: base("No type registration was found for the type \"" + type.Name + "\".")
{
}
/// <summary>
/// Creates a ModelRegistrationNotFoundException for a resource type name lookup failure
/// </summary>
/// <param name="resourceTypeName"></param>
public TypeRegistrationNotFoundException(string resourceTypeName)
: base("No type registration was found for the type name \"" + resourceTypeName + "\".")
{
}
}
}