using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;

namespace Sasa.QualityTools.DrFx.Tests.Violation.CSharp.Microsoft.Security
{
    public static class Rule2102
    {
        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
        public static string ReadFile(string file)
        {
            try
            {
                return File.ReadAllText(file);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                return null;
            }
        }
    }
}
