49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace EnVisage.Code.BLL
|
|
{
|
|
/// <summary>
|
|
/// Represents an exception occurred inside the business logic layer.
|
|
/// </summary>
|
|
public class BLLException : Exception
|
|
{
|
|
public bool DisplayError { get; set; }
|
|
|
|
public BLLException(bool displayError = true)
|
|
{
|
|
DisplayError = displayError;
|
|
}
|
|
|
|
public BLLException(string message) : base(message)
|
|
{
|
|
DisplayError = true;
|
|
}
|
|
|
|
public BLLException(string message, bool displayError = true) : base(message)
|
|
{
|
|
DisplayError = displayError;
|
|
}
|
|
}
|
|
|
|
#region BLLException Implementations
|
|
public class UOMNotExistsException : BLLException
|
|
{
|
|
public UOMNotExistsException()
|
|
: base("Unit of Measure does not exist or it's value equal to zero. Unable to calculate data.", true)
|
|
{
|
|
|
|
}
|
|
}
|
|
public class RestorePasswordTokenExpiredException : BLLException
|
|
{
|
|
public RestorePasswordTokenExpiredException()
|
|
: base("Restore password link is expired.", true)
|
|
{
|
|
|
|
}
|
|
}
|
|
#endregion
|
|
} |