40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Xylem.Common.CommonCore.Exceptions.WaterMeter
|
|
{
|
|
public class LvlNotSupportedException : Exception, ICommonException
|
|
{
|
|
Guid? LCode = null;
|
|
public LvlNotSupportedException(Guid? Location = null)
|
|
{
|
|
LCode = Location;
|
|
}
|
|
public LvlNotSupportedException(string message, Guid? Location = null)
|
|
: base(message)
|
|
{
|
|
LCode = Location;
|
|
}
|
|
|
|
public LvlNotSupportedException(string message, Exception inner, Guid? Location = null)
|
|
: base(message, inner)
|
|
{
|
|
LCode = Location;
|
|
}
|
|
|
|
public string GetHelpText()
|
|
{
|
|
var sb = new StringBuilder();
|
|
|
|
sb.AppendLine($"You can not login at this lvl if the meter is locked.");
|
|
sb.AppendLine($"Try to use an other level or unlock the meter.");
|
|
if (LCode.HasValue)
|
|
{
|
|
sb.AppendLine($"LCode:{LCode.Value}");
|
|
}
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
}
|