summaryrefslogtreecommitdiff
path: root/portato/eix/exceptions.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 23:57:35 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 23:57:35 +0200
commite4c2a57cdbb9082ce1cab7cbbfad122b16c56ff1 (patch)
treeb8b21b600c086aa9295af7317202476034930592 /portato/eix/exceptions.py
parentc916c961f34f47fdb25d5384370b0aed7e90ea49 (diff)
parent8d2b915b7705ba7d831d48ce9623ca8fe46f6f38 (diff)
downloadportato-e4c2a57cdbb9082ce1cab7cbbfad122b16c56ff1.tar.gz
portato-e4c2a57cdbb9082ce1cab7cbbfad122b16c56ff1.tar.bz2
portato-e4c2a57cdbb9082ce1cab7cbbfad122b16c56ff1.zip
Merged in eix-branch
Diffstat (limited to '')
-rw-r--r--portato/eix/exceptions.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/portato/eix/exceptions.py b/portato/eix/exceptions.py
new file mode 100644
index 0000000..8145af4
--- /dev/null
+++ b/portato/eix/exceptions.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+#
+# File: portato/eix/exceptions.py
+# This file is part of the Portato-Project, a graphical portage-frontend.
+#
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
+# This is free software. You may redistribute copies of it under the terms of
+# the GNU General Public License version 2.
+# There is NO WARRANTY, to the extent permitted by law.
+#
+# Written by René 'Necoro' Neumann <necoro@necoro.net>
+
+"""
+Different exceptions used in the eix module.
+"""
+
+from __future__ import absolute_import, with_statement
+__docformat__ = "restructuredtext"
+
+class EixError (Exception):
+ """
+ The base class for all exceptions of this module.
+
+ :ivar message: The error message
+ """
+ message = _("Unknown error.")
+
+ def __str__ (self):
+ return self.message
+
+class EndOfFileException (EixError):
+ """
+ Denotes the unexpected EOF.
+ """
+
+ def __init__ (self, filename):
+ self.message = _("End of file reached though it was not expected: '%s'") % filename
+
+class UnsupportedVersionError (EixError):
+ """
+ The version of the cache file found is not supported.
+ """
+
+ def __init__ (self, version):
+ self.message = _("Version '%s' is not supported.") % version