public static void LogUnhandledExceptionInitializingRule(IAnalysisContext context, Exception exception)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
// An unhandled exception was encountered initializing check '{0}', which
// has been disabled for the remainder of the analysis.
context.Logger.LogToolNotification(
CreateNotification(
context.TargetUri,
ERR998_ExceptionInInitialize,
context.Rule.Id,
NotificationLevel.Error,
exception,
true,
context.Rule.Name));
context.RuntimeErrors |= RuntimeConditions.ExceptionInSkimmerInitialize;
}