42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
|
|
namespace SolutionCleanupTool.Exceptions
|
|
{
|
|
/// <summary>
|
|
/// Exception thrown when file system operations fail
|
|
/// </summary>
|
|
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;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Types of file system errors
|
|
/// </summary>
|
|
public enum FileSystemErrorType
|
|
{
|
|
FileNotFound,
|
|
DirectoryNotFound,
|
|
AccessDenied,
|
|
InsufficientDiskSpace,
|
|
FileInUse,
|
|
InvalidPath,
|
|
ReadError,
|
|
WriteError
|
|
}
|
|
} |