1"""
2Exception classes used in dak
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"""
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.
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.
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
24class DakError(Exception):
25 """
26 Base class for all simple errors in this module.
27 """
29 pass
32class ParseMaintError(DakError):
33 "Exception raised for errors in parsing a maintainer field."
35 pass
38class ParseChangesError(DakError):
39 "Exception raised for errors in parsing a changes file."
41 pass
44class InvalidDscError(DakError):
45 "Exception raised for invalid dsc files."
47 pass
50class UnknownFormatError(DakError):
51 "Exception raised for unknown Format: lines in changes files."
53 pass
56class NoFilesFieldError(DakError):
57 """Exception raised for missing files field in dsc/changes."""
59 pass
62class CantOverwriteError(DakError):
63 "Exception raised when files can't be overwritten."
65 pass
68class SendmailFailedError(DakError):
69 "Exception raised when Sendmail invocation failed."
71 pass
74class NoFreeFilenameError(DakError):
75 "Exception raised when no alternate filename was found."
77 pass
80class TransitionsError(DakError):
81 "Exception raised when transitions file can't be parsed."
83 pass
86class DBUpdateError(DakError):
87 "Exception raised - could not update the database"
89 pass
92class AlreadyLockedError(DakError):
93 "Exception raised - package already locked by someone else"
95 pass