"""
ajaxWM - the free web based window manager for remote terminals
Copyright (C) 2007 Dennis Felsing, Andreas Waidler

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

$Id: Error.py 76 2007-12-15 11:26:24Z r0q $
"""

class Login_Error(Exception):#{{{
    """Exception class for errors when logging in."""
    def __init__(self, value=None):#{{{
        self.value = value
    #}}}
#}}}

class ID_Error(Exception):#{{{
    SESSION = 'session'
    WINDOW = 'window'
    UNKNOWN = 'unkown'
    """Exception class for errors about session IDs and window IDs."""
    def __init__(self, value=None):
        if value in (self.SESSION, self.WINDOW):
            self.value = value
        else:
            self.value = self.UNKNOWN
        self.value = '<error>%s</error>' % self.value
#}}}

#------------------------------------------------------------------------------
# vim: fdm=marker ts=4 sw=4 expandtab 
