Lots of additions and changes
This commit is contained in:
25
TOOHUCardAPI/Data/Exceptions.cs
Normal file
25
TOOHUCardAPI/Data/Exceptions.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using TOOHUCardAPI.Data.Services;
|
||||
using TOOHUCardAPI.DTO;
|
||||
|
||||
namespace TOOHUCardAPI.Data
|
||||
{
|
||||
public abstract class TooHooException : Exception
|
||||
{
|
||||
public abstract AbstractResponse response { get; }
|
||||
}
|
||||
public class InvalidUserException : TooHooException
|
||||
{
|
||||
public override AbstractResponse response => new InvalidUserResponse();
|
||||
}
|
||||
|
||||
public class InsufficientPointsException : TooHooException
|
||||
{
|
||||
public override AbstractResponse response => new InsufficientPointsResponse();
|
||||
}
|
||||
|
||||
public class NotFirstWinException : TooHooException
|
||||
{
|
||||
public override AbstractResponse response => new NotFirstWinResponse();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user