request/src/request.result/_errors/ExceptionError.cs

29 lines
684 B
C#
Raw Normal View History

// Copyright (c) The Geekeey Authors
// SPDX-License-Identifier: EUPL-1.2
namespace Geekeey.Request.Result;
/// <summary>
/// An error which is constructed from an exception.
/// </summary>
public sealed class ExceptionError : Error
{
/// <summary>
/// An error which is constructed from an exception.
/// </summary>
/// <param name="exception">The exception in the error.</param>
public ExceptionError(Exception exception)
{
Exception = exception;
}
/// <summary>
/// The exception in the error.
/// </summary>
public Exception Exception { get; }
/// <summary>
/// The exception in the error.
/// </summary>
public override string Message => Exception.Message;
}