Container traits to extensions
This commit is contained in:
@@ -8,25 +8,24 @@ public enum ItemNotFoundExceptionType
|
||||
FullName,
|
||||
NativePath
|
||||
}
|
||||
|
||||
public class ItemNotFoundException : Exception
|
||||
{
|
||||
public string Path { get; }
|
||||
public ItemNotFoundExceptionType Type { get; } = ItemNotFoundExceptionType.Raw;
|
||||
|
||||
public ItemNotFoundException(string path)
|
||||
public ItemNotFoundException(string path) : base("Item not found " + path)
|
||||
{
|
||||
Path = path;
|
||||
}
|
||||
|
||||
public ItemNotFoundException(FullName path)
|
||||
public ItemNotFoundException(FullName path) : this(path.Path)
|
||||
{
|
||||
Path = path.Path;
|
||||
Type = ItemNotFoundExceptionType.FullName;
|
||||
}
|
||||
|
||||
public ItemNotFoundException(NativePath path)
|
||||
public ItemNotFoundException(NativePath path) : this(path.Path)
|
||||
{
|
||||
Path = path.Path;
|
||||
Type = ItemNotFoundExceptionType.NativePath;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user