41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
using System;
|
|
using System.Text;
|
|
|
|
namespace Xylem.Common.CommonCore.Exceptions.Db
|
|
{
|
|
public class NoKeyStoredException : Exception, ICommonException
|
|
{
|
|
Guid? _lCode;
|
|
public NoKeyStoredException(Guid? location = null)
|
|
{
|
|
_lCode = location;
|
|
}
|
|
public NoKeyStoredException(String message, Guid? location = null)
|
|
: base(message)
|
|
{
|
|
_lCode = location;
|
|
}
|
|
|
|
public NoKeyStoredException(String message, Exception inner, Guid? location = null)
|
|
: base(message, inner)
|
|
{
|
|
_lCode = location;
|
|
}
|
|
|
|
public String GetHelpText()
|
|
{
|
|
var sb = new StringBuilder();
|
|
|
|
sb.AppendLine("Report this to a developer or database admin.");
|
|
sb.AppendLine("Something went wrong while store the keyset on BSI.");
|
|
|
|
|
|
if (_lCode.HasValue)
|
|
{
|
|
sb.AppendLine($"LCode:{_lCode.Value}");
|
|
}
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
}
|