using System;
namespace VersOne.Epub
{
///
/// Represents an exception thrown by the EpubReader due to a remote content downloading error.
///
public class EpubContentDownloaderException : EpubReaderException
{
///
/// Initializes a new instance of the class with a specified URI of the remote content file.
///
/// The absolute URI of the remote content file that caused the error.
public EpubContentDownloaderException(string remoteContentFileUrl)
{
RemoteContentFileUrl = remoteContentFileUrl;
}
///
/// Initializes a new instance of the class with a specified error and a specified URI of the remote content file.
///
/// The message that describes the error.
/// The absolute URI of the remote content file that caused the error.
public EpubContentDownloaderException(string message, string remoteContentFileUrl)
: base(message)
{
RemoteContentFileUrl = remoteContentFileUrl;
}
///
/// 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 URI of the remote content file.
///
/// 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 absolute URI of the remote content file that caused the error.
public EpubContentDownloaderException(string message, Exception? innerException, string remoteContentFileUrl)
: base(message, innerException)
{
RemoteContentFileUrl = remoteContentFileUrl;
}
///
/// Gets absolute URI of the remote content file that caused the error.
///
public string RemoteContentFileUrl { get; }
}
}