mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
50 lines
1.2 KiB
// ==========================================================================
|
|
// DomainObjectException.cs
|
|
// PinkParrot Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) PinkParrot Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System;
|
|
|
|
namespace PinkParrot.Infrastructure
|
|
{
|
|
public class DomainObjectException : Exception
|
|
{
|
|
private readonly string id;
|
|
private readonly string typeName;
|
|
|
|
public string TypeName
|
|
{
|
|
get
|
|
{
|
|
return typeName;
|
|
}
|
|
}
|
|
|
|
public string Id
|
|
{
|
|
get
|
|
{
|
|
return id;
|
|
}
|
|
}
|
|
|
|
protected DomainObjectException(string message, string id, Type type)
|
|
: this(message, id, type, null)
|
|
{
|
|
}
|
|
|
|
protected DomainObjectException(string message, string id, Type type, Exception inner)
|
|
: base(message, inner)
|
|
{
|
|
this.id = id;
|
|
|
|
if (type != null)
|
|
{
|
|
typeName = type.Name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|