source: tags/0.2.2/error.py @ 295

Revision 295, 2.0 KB checked in by marc, 3 years ago (diff)

Updated debian build, copyrights, names, etc

  • Property svn:keywords set to Id
Line 
1#! /usr/bin/env python
2# -*- coding: utf8 -*-
3#
4# Itaka is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2 of the License, or
7# any later version.
8#
9# Itaka is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with Itaka; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17#
18# Copyright 2003-2009 Marc E.
19# http://itaka.jardinpresente.com.ar
20#
21# $Id$
22
23""" Itaka error handling exception definitions """
24
25class ItakaError(Exception):
26    """
27    Base class for all Itaka Errors.
28    """
29
30    def __init__(self, message):
31        """
32        Constructor.
33
34        @type message: str
35        @param message: exception message.
36        """
37
38        self.message = message
39
40    def __str__(self):
41        """
42        String representation.
43
44        @rtype: str
45        @return: String representation of Exception message.
46        """
47
48        return repr(self.message)
49
50class ItakaServerError(ItakaError):
51    """
52    Exception raised by server methods.
53    """
54    pass
55
56class ItakaServerErrorCannotListen(ItakaServerError):
57    """
58    Exception raised by server methods.
59    """
60    pass
61
62class ItakaScreenshotError(ItakaError):
63    """
64    Exception raised by screenshooting methods.
65    """
66    pass
67
68class ItakaScreenshotErrorWmHints(ItakaScreenshotError):
69    """
70    Exception raised by screenshooting methods.
71    """
72    pass
73
74class ItakaScreenshotErrorActiveDesktop(ItakaScreenshotError):
75    """
76    Exception raised by screenshooting methods.
77    """
78    pass
79   
80class ItakaSaveScreenshotError(ItakaScreenshotError):
81    """
82    Exception raised by screenshooting methods.
83    """
84    pass
Note: See TracBrowser for help on using the repository browser.