private static string ErrorToText(HFSError error) { switch (error) { case HFSError.HFSIndexMismatch: return("Can't parse HFS Index"); case HFSError.HFSFileMismatch: return("Can't parse HFS File"); case HFSError.HFSDirectoryMismatch: return("Can't parse HFS Directory"); default: throw new ArgumentOutOfRangeException(nameof(error)); } }
public HFSException(HFSError error) : base(ErrorToText(error)) { ErrorType = error; }