26 lines
770 B
C#
26 lines
770 B
C#
using System.Runtime.Serialization;
|
|
using NetinaShop.Common.Models.Api;
|
|
|
|
namespace NetinaShop.Common.Models.Exception
|
|
{
|
|
[Serializable()]
|
|
public class AppException : System.Exception
|
|
{
|
|
protected AppException(SerializationInfo info, StreamingContext context) : base(info, context) { }
|
|
|
|
public ApiResultStatusCode StatusCode { get; set; }
|
|
public AppException()
|
|
{
|
|
StatusCode = ApiResultStatusCode.ServerError;
|
|
}
|
|
public AppException(string message) : base(message)
|
|
{
|
|
StatusCode = ApiResultStatusCode.ServerError;
|
|
}
|
|
|
|
public AppException(string message, ApiResultStatusCode statusCode) : base(message)
|
|
{
|
|
StatusCode = statusCode;
|
|
}
|
|
}
|
|
} |