Files
BeWoPlaner/Shared/Exceptions/BeWoNotImplementedException.cs

45 lines
1.0 KiB
C#
Raw Permalink Normal View History

2025-07-25 14:27:49 +02:00
using BS.Shared.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Exceptions
{
public class BeWoNotImplementedException : NotImplementedException
{
public BeWoNotImplementedException() : base()
{
}
public BeWoNotImplementedException(string message) : base(message)
{
}
public BeWoNotImplementedException(string message, Exception inner) : base(message, inner)
{
}
protected BeWoNotImplementedException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
public static BeWoNotImplementedException CreateFromEnum(Enum value)
{
var type = value.GetType().Name;
return new BeWoNotImplementedException($"{type} {value} ist nicht implementiert.");
}
2025-07-25 14:27:57 +02:00
public static BeWoNotImplementedException CreateFromInvalidObject(object obj)
{
var type = obj.GetType().Name;
var str = obj.ToString();
return new BeWoNotImplementedException($"{type}, {str}");
}
2025-07-25 14:27:49 +02:00
}
}