Source code for x2gobroker.x2gobroker_exceptions
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
# Copyright (C) 2012-2019 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
#
# X2Go Session Broker is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# X2Go Session Broker 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
from x2gobroker.loggers import logger_error
[docs]class X2GoBrokerBaseException(BaseException):
"""\
Base exception for all X2Go Session Broker exceptions."
"""
def __init__(self, *args, **kwargs):
BaseException.__init__(self, *args, **kwargs)
logger_error.error('exception raised: {exception}("{msg}")'.format(exception=type(self).__name__, msg=str(self)))
[docs]class X2GoBrokerAgentException(X2GoBrokerBaseException):
"""\
X2Go Broker Agent exception class. Used for failures during broker
<-> broker agent communications.
"""
pass
[docs]class X2GoBrokerProfileException(X2GoBrokerBaseException):
"""\
X2Go Broker exception class for session profile problems. Used for
failures when parsing and processing session profiles.
"""
pass