galaeth-draft/Galaeth.Core/Exceptions/MigrationException.cs
2024-11-17 09:31:01 +00:00

18 lines
599 B
C#

namespace Galaeth.Core.Exceptions;
/// <summary>
/// Exception to be thrown if errors occur during migrations.
/// </summary>
public class MigrationException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="MigrationException"/> class.
/// </summary>
/// <param name="file">The migration file causing the error.</param>
/// <param name="error">The error message.</param>
public MigrationException(string file, string error)
: base($"An exception occured whilst attempting to migrate the database with file {file}: {error}")
{
}
}