Table of Contents

SetErrorHandler Method

SetErrorHandler(Func<Exception, Fibers, ErrorReason, ErrorHandlingPolicy>?)

public void SetErrorHandler(Func<Exception, Fibers, Fibers.ErrorReason, Fibers.ErrorHandlingPolicy>? errorHandler)

Sets the error handler for the fiber.

Parameters

errorHandler Func<Exception, Fibers, Fibers.ErrorReason, Fibers.ErrorHandlingPolicy>

The function to call when an error occurs. It takes the exception, the fiber instance, and the error reason, and returns an Fibers.ErrorHandlingPolicy.