Files
BeWoPlaner/Shared/Exceptions/GkvException.cs
Rene Evertz a5cfbdfc96 Gkv8 sendet an Kundenapp
Bei Fehler wird es aufm App8 als ResultXML gespeichert
2024-10-30 11:43:23 +01:00

46 lines
963 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Exceptions
{
public class GkvException : ArgumentException
{
public string Title { get; set; }
public override string Message { get; }
public GkvException(string message, string title) : this(message)
{
Title = title;
}
public GkvException(string message) : this()
{
Message = message;
}
public GkvException()
{
}
public override string ToString()
{
var sb = new StringBuilder();
if (!string.IsNullOrEmpty(Title))
sb.Append(Title + " - ");
if (!string.IsNullOrEmpty(Message))
sb.Append(Message + " - ");
if(sb.Length == 0)
sb.Append(base.ToString());
return sb.ToString();
}
}
}