blob: 685b672948bc9c9a737fa5de681af9f45d07248d [file] [log] [blame]
namespace DotPulsar.Internal
{
using DotPulsar.Abstractions;
using System;
using System.Threading.Tasks;
public sealed class ActionExceptionHandler : IHandleException
{
private readonly Action<ExceptionContext> _exceptionHandler;
public ActionExceptionHandler(Action<ExceptionContext> exceptionHandler)
=> _exceptionHandler = exceptionHandler;
public ValueTask OnException(ExceptionContext exceptionContext)
{
_exceptionHandler(exceptionContext);
return new ValueTask();
}
}
}