using System; namespace KcpSharp { /// /// An instance that can produce exceptions in background jobs. /// /// The type of the instance. public interface IKcpExceptionProducer { /// /// Set the handler to invoke when exception is thrown. Return true in the handler to ignore the error and continue running. Return false in the handler to abort the operation. /// /// The exception handler. /// The state object to pass into the exception handler. void SetExceptionHandler(Func handler, object? state); } }