Share via


EventProcessorOptions.SetExceptionHandler Method

Definition

Sets a handler which receives notification of general exceptions.

Exceptions which occur while processing events from a particular Event Hub partition are delivered to the onError method of the event processor for that partition. This handler is called on occasions when there is no event processor associated with the throwing activity, or the event processor could not be created.

public void SetExceptionHandler (Action<Microsoft.Azure.EventHubs.Processor.ExceptionReceivedEventArgs> exceptionHandler);
member this.SetExceptionHandler : Action<Microsoft.Azure.EventHubs.Processor.ExceptionReceivedEventArgs> -> unit
Public Sub SetExceptionHandler (exceptionHandler As Action(Of ExceptionReceivedEventArgs))

Parameters

exceptionHandler
Action<ExceptionReceivedEventArgs>

Handler which is called when an exception occurs. Set to null to stop handling.

Applies to