DiskFullException.cs 736 B

12345678910111213141516171819202122232425
  1. /* Copyright (C) 2018 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.IO;
  9. namespace DiskAccessLibrary
  10. {
  11. public class DiskFullException : IOException
  12. {
  13. public DiskFullException() : this("Disk Full")
  14. {
  15. }
  16. public DiskFullException(string message) : base(message)
  17. {
  18. #if Win32
  19. HResult = IOExceptionHelper.GetHResultFromWin32Error(Win32Error.ERROR_DISK_FULL);
  20. #endif
  21. }
  22. }
  23. }