﻿using System;

namespace LiteDB.Shell
{
    internal class ShellException : Exception
    {
        public ShellException(string message)
            : base(message)
        {
        }

        public static ShellException NoDatabase()
        {
            return new ShellException("No open database");
        }
    }
}
﻿using System;

namespace LiteDB.Shell
{
    [Serializable]
    internal class ShellException : Exception
    {
        public ShellException(string message)
            : base(message)
        {
        }

        public static ShellException NoDatabase()
        {
            return new ShellException("No open database");
        }
    }
}

Mark class [Serializable] to address warning
Mark class [Serializable] to address warning

Addresses warning CA2237: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2237-mark-iserializable-types-with-serializableattribute