NServiceBus.CriticalError.RaiseForEndpoint C# (CSharp) Method

RaiseForEndpoint() public method

public RaiseForEndpoint ( string errorMessage, Exception exception ) : void
errorMessage string
exception System.Exception
return void
        void RaiseForEndpoint(string errorMessage, Exception exception)
        {
            Task.Run(() =>
            {
                var context = new CriticalErrorContext(endpoint.Stop, errorMessage, exception);
                return criticalErrorAction(context);
            });
        }