using System;
namespace SolutionCleanupTool.Exceptions
{
///
/// Exception thrown when file system operations fail
///
public class FileSystemException : SolutionCleanupException
{
public string FilePath { get; }
public FileSystemErrorType ErrorType { get; }
public FileSystemException(string message, string filePath, FileSystemErrorType errorType)
: base(message)
{
FilePath = filePath;
ErrorType = errorType;
}
public FileSystemException(string message, string filePath, FileSystemErrorType errorType, Exception innerException)
: base(message, innerException)
{
FilePath = filePath;
ErrorType = errorType;
}
}
///
/// Types of file system errors
///
public enum FileSystemErrorType
{
FileNotFound,
DirectoryNotFound,
AccessDenied,
InsufficientDiskSpace,
FileInUse,
InvalidPath,
ReadError,
WriteError
}
}