21 lines
767 B
C#
21 lines
767 B
C#
// <copyright file="MigrationException.cs" company="alveus.dev">
|
|
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
|
|
// </copyright>
|
|
|
|
namespace Astral.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}")
|
|
{
|
|
}
|
|
}
|