galaeth-draft/Galaeth.Core/Exceptions/MigrationException.cs

18 lines
599 B
C#
Raw Normal View History

2024-11-17 10:31:01 +01:00
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}")
{
}
}