dak_exceptions.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. """
  2. Exception classes used in dak
  3. @contact: Debian FTP Master <ftpmaster@debian.org>
  4. @copyright: 2008 Mark Hymers <mhy@debian.org>
  5. @license: GNU General Public License version 2 or later
  6. """
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. class DakError(Exception):
  19. """
  20. Base class for all simple errors in this module.
  21. """
  22. pass
  23. class ParseMaintError(DakError):
  24. "Exception raised for errors in parsing a maintainer field."
  25. pass
  26. class ParseChangesError(DakError):
  27. "Exception raised for errors in parsing a changes file."
  28. pass
  29. class InvalidDscError(DakError):
  30. "Exception raised for invalid dsc files."
  31. pass
  32. class UnknownFormatError(DakError):
  33. "Exception raised for unknown Format: lines in changes files."
  34. pass
  35. class NoFilesFieldError(DakError):
  36. """Exception raised for missing files field in dsc/changes."""
  37. pass
  38. class CantOverwriteError(DakError):
  39. "Exception raised when files can't be overwritten."
  40. pass
  41. class SendmailFailedError(DakError):
  42. "Exception raised when Sendmail invocation failed."
  43. pass
  44. class NoFreeFilenameError(DakError):
  45. "Exception raised when no alternate filename was found."
  46. pass
  47. class TransitionsError(DakError):
  48. "Exception raised when transitions file can't be parsed."
  49. pass
  50. class DBUpdateError(DakError):
  51. "Exception raised - could not update the database"
  52. pass
  53. class AlreadyLockedError(DakError):
  54. "Exception raised - package already locked by someone else"
  55. pass