Delegate Container.ChangeFeedMonitorErrorDelegate
Delegate to notify errors during change feed operations.
public delegate Task Container.ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception)
Parameters
leaseToken
stringA unique identifier for the lease.
exception
ExceptionThe exception that happened.
Returns
- Extension Methods
Examples
(string leaseToken, Exception exception) =>
{
if (exception is ChangeFeedProcessorUserException userException)
{
Console.WriteLine($"Current instance's delegate had an unhandled when processing lease {leaseToken}.");
Console.WriteLine($"Diagnostics {userException.ExceptionContext.Diagnostics}");
Console.WriteLine($"Headers {userException.ExceptionContext.Headers}");
Console.WriteLine(userException.ToString());
}
else
{
Console.WriteLine($"Current instance faced an exception when processing lease {leaseToken}.");
Console.WriteLine(exception.ToString());
}
return Task.CompletedTask;
}
Constructors
ChangeFeedMonitorErrorDelegate(object, nint)
public ChangeFeedMonitorErrorDelegate(object @object, nint method)
Parameters
Methods
BeginInvoke(string, Exception, AsyncCallback, object)
public virtual IAsyncResult BeginInvoke(string leaseToken, Exception exception, AsyncCallback callback, object @object)
Parameters
leaseToken
stringexception
Exceptioncallback
AsyncCallbackobject
object
Returns
EndInvoke(IAsyncResult)
public virtual Task EndInvoke(IAsyncResult result)
Parameters
result
IAsyncResult
Returns
Invoke(string, Exception)
public virtual Task Invoke(string leaseToken, Exception exception)