using System;
namespace VersOne.Epub
{
///
/// Represents an exception thrown by the EpubReader due to a missing content file within the EPUB archive.
///
public class EpubContentException : EpubReaderException
{
///
/// Initializes a new instance of the class with a specified content file path.
///
/// The path of the content file that caused the error.
public EpubContentException(string contentFilePath)
{
ContentFilePath = contentFilePath;
}
///
/// Initializes a new instance of the class with a specified error and a specified content file path.
///
/// The message that describes the error.
/// The path of the content file that caused the error.
public EpubContentException(string message, string contentFilePath)
: base(message)
{
ContentFilePath = contentFilePath;
}
///
/// Initializes a new instance of the class with a specified error message, a reference to the inner exception
/// that is the cause of this exception, and a specified content file path.
///
/// The error message that explains the reason for the exception.
/// The exception that is the cause of the current exception, or a null reference if no inner exception is specified.
/// The path of the content file that caused the error.
public EpubContentException(string message, Exception? innerException, string contentFilePath)
: base(message, innerException)
{
ContentFilePath = contentFilePath;
}
///
/// Gets the path of the content file that caused the error.
///
public string ContentFilePath { get; }
}
}