23 lines
384 B
C#
23 lines
384 B
C#
namespace MyOffice.Core;
|
|
|
|
public class Error
|
|
{
|
|
private Exception? _exception;
|
|
|
|
public Error(string message)
|
|
{
|
|
Message = message;
|
|
}
|
|
|
|
public Error(Exception exception): this(exception.GetType().Name)
|
|
{
|
|
_exception = exception;
|
|
}
|
|
|
|
public Error(string message, Exception exception): this(message)
|
|
{
|
|
_exception = exception;
|
|
}
|
|
|
|
public string Message { get; private set;}
|
|
} |