1""" 

2Exception classes used in dak 

3 

4@contact: Debian FTP Master <ftpmaster@debian.org> 

5@copyright: 2008 Mark Hymers <mhy@debian.org> 

6@license: GNU General Public License version 2 or later 

7""" 

8 

9# This program is free software; you can redistribute it and/or modify 

10# it under the terms of the GNU General Public License as published by 

11# the Free Software Foundation; either version 2 of the License, or 

12# (at your option) any later version. 

13 

14# This program is distributed in the hope that it will be useful, 

15# but WITHOUT ANY WARRANTY; without even the implied warranty of 

16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

17# GNU General Public License for more details. 

18 

19# You should have received a copy of the GNU General Public License 

20# along with this program; if not, write to the Free Software 

21# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 

22 

23 

24class DakError(Exception): 

25 """ 

26 Base class for all simple errors in this module. 

27 """ 

28 

29 pass 

30 

31 

32class ParseMaintError(DakError): 

33 "Exception raised for errors in parsing a maintainer field." 

34 

35 pass 

36 

37 

38class ParseChangesError(DakError): 

39 "Exception raised for errors in parsing a changes file." 

40 

41 pass 

42 

43 

44class InvalidDscError(DakError): 

45 "Exception raised for invalid dsc files." 

46 

47 pass 

48 

49 

50class UnknownFormatError(DakError): 

51 "Exception raised for unknown Format: lines in changes files." 

52 

53 pass 

54 

55 

56class NoFilesFieldError(DakError): 

57 """Exception raised for missing files field in dsc/changes.""" 

58 

59 pass 

60 

61 

62class CantOverwriteError(DakError): 

63 "Exception raised when files can't be overwritten." 

64 

65 pass 

66 

67 

68class SendmailFailedError(DakError): 

69 "Exception raised when Sendmail invocation failed." 

70 

71 pass 

72 

73 

74class NoFreeFilenameError(DakError): 

75 "Exception raised when no alternate filename was found." 

76 

77 pass 

78 

79 

80class TransitionsError(DakError): 

81 "Exception raised when transitions file can't be parsed." 

82 

83 pass 

84 

85 

86class DBUpdateError(DakError): 

87 "Exception raised - could not update the database" 

88 

89 pass 

90 

91 

92class AlreadyLockedError(DakError): 

93 "Exception raised - package already locked by someone else" 

94 

95 pass