astral-api/Astral.Core/Exceptions/MigrationException.cs

22 lines
767 B
C#
Raw Permalink Normal View History

2024-12-11 21:36:30 +01:00
// <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}")
{
}
}