using System;

namespace Valg.EVA.Skanning.Contracts
{
    [Serializable]
    public class DatabaseCompatibilityException : Exception
    {
        public DatabaseCompatibilityException(string currentDatabaseVersion, string expectedDatabaseVersion) 
        {
            CurrentDatabaseVersion = currentDatabaseVersion;
            ExpectedDatabaseVersion = expectedDatabaseVersion;
        }

        public string CurrentDatabaseVersion { get; }
        public string ExpectedDatabaseVersion { get; }

        public override string Message =>  $"An exception of type { GetType() } was thrown. Current database version: {CurrentDatabaseVersion}, Expected database version: {ExpectedDatabaseVersion}";
    }
}
