blob: 6e22d971b3bccc86b4805d523a3d1540a91800f9 [file] [log] [blame]
using DotPulsar.Abstractions;
using System;
using System.Threading.Tasks;
namespace DotPulsar.Internal
{
public sealed class FuncExceptionHandler : IHandleException
{
private readonly Func<ExceptionContext, ValueTask> _exceptionHandler;
public FuncExceptionHandler(Func<ExceptionContext, ValueTask> exceptionHandler) => _exceptionHandler = exceptionHandler;
public ValueTask OnException(ExceptionContext exceptionContext) => _exceptionHandler(exceptionContext);
}
}