blob: 8d99a9e5eedf0de18fe87a3faeac41292ade1d66 [file] [log] [blame]
namespace DotPulsar.Internal
{
using DotPulsar.Abstractions;
using System;
using System.Threading.Tasks;
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);
}
}