laatzen/Common/CommonCore/Exceptions/DB/PcbIdNotException.cs
2022-08-26 16:14:40 +02:00

41 lines
1.1 KiB
C#

using System;
using System.Text;
namespace Xylem.Common.CommonCore.Exceptions.Db
{
public class PcbIdNotException : Exception, ICommonException
{
Guid? _lCode;
public PcbIdNotException(Guid? location = null)
{
_lCode = location;
}
public PcbIdNotException(String message, Guid? location = null)
: base(message)
{
_lCode = location;
}
public PcbIdNotException(String message, Exception inner, Guid? location = null)
: base(message, inner)
{
_lCode = location;
}
public String GetHelpText()
{
var sb = new StringBuilder();
sb.AppendLine("1. Retry your request.");
sb.AppendLine("2. Check if your pcb was produced by LAA Operations.");
sb.AppendLine("3. Ask the source of your pcb for the password and the pcbid and let it register at LAA Operations.");
if (_lCode.HasValue)
{
sb.AppendLine($"LCode:{_lCode.Value}");
}
return sb.ToString();
}
}
}