public static void LogExceptionAccessingFile(IAnalysisContext context, string fileName, Exception exception)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
// Could not access a file specified on the command-line: '{0}'.
context.Logger.LogConfigurationNotification(
CreateNotification(
context.TargetUri,
ERR997_ExceptionAccessingFile,
NotificationLevel.Error,
exception,
false,
fileName));
context.RuntimeErrors |= RuntimeConditions.ExceptionAccessingFile;
}