# Path: elbepack/projectmanager.py
# class ProjectManagerError(Exception):
#     def __init__(self, message):
#         Exception.__init__(self, message)
# 
# class InvalidState(ProjectManagerError):
#     def __init__(self, message):
#         ProjectManagerError.__init__(self, message)
# 
# Path: elbepack/elbexml.py
# class ValidationError(Exception):
#     def __init__(self, validation):
#         Exception.__init__(self)
#         self.validation = validation
# 
#     def __repr__(self):
#         rep = "Elbe XML Validation Error\n"
#         for v in self.validation:
#             rep += (v + '\n')
#         return rep
# 
#     def __str__(self):
#         retval = ""
#         for v in self.validation:
#             retval += (v + '\n')
#         return retval
# 
# Path: elbepack/db.py
# class ElbeDBError(Exception):
#     def __init__(self, message):
#         Exception.__init__(self, message)
# 
# class InvalidLogin(Exception):
#     def __init__(self):
#         Exception.__init__(self, "Invalid login")


from traceback import format_exc
from functools import wraps
from spyne.model.fault import Fault
from elbepack.projectmanager import ProjectManagerError, InvalidState
from elbepack.elbexml import ValidationError
from elbepack.db import ElbeDBError, InvalidLogin

# Import the Errors we try to catch wirh the
# soap_faults decorator


class SoapElbeDBError(Fault):
    def __init__(self, dberr):
        Fault.__init__(self, faultcode="ElbeDBError", faultstring=str(dberr))


class SoapElbeProjectError(Fault):
    def __init__(self, err):
        Fault.__init__(
            self,
            faultcode="ElbeProjectError",
            faultstring=str(err))


class SoapElbeAuthenticationFailed(Fault):
    def __init__(self):
        Fault.__init__(
            self,
            faultcode="ElbeAuthenticationFailed",
            faultstring="Authentication Failed")


class SoapElbeNotLoggedIn(Fault):
    def __init__(self):
        Fault.__init__(
            self,

# Path: elbepack/projectmanager.py
# class ProjectManagerError(Exception):
#     def __init__(self, message):
#         Exception.__init__(self, message)
# 
# class InvalidState(ProjectManagerError):
#     def __init__(self, message):
#         ProjectManagerError.__init__(self, message)
# 
# Path: elbepack/elbexml.py
# class ValidationError(Exception):
#     def __init__(self, validation):
#         Exception.__init__(self)
#         self.validation = validation
# 
#     def __repr__(self):
#         rep = "Elbe XML Validation Error\n"
#         for v in self.validation:
#             rep += (v + '\n')
#         return rep
# 
#     def __str__(self):
#         retval = ""
#         for v in self.validation:
#             retval += (v + '\n')
#         return retval
# 
# Path: elbepack/db.py
# class ElbeDBError(Exception):
#     def __init__(self, message):
#         Exception.__init__(self, message)
# 
# class InvalidLogin(Exception):
#     def __init__(self):
#         Exception.__init__(self, "Invalid login")


# Path: elbepack/daemons/soap/faults.py
from traceback import format_exc
from functools import wraps
from spyne.model.fault import Fault
from elbepack.projectmanager import ProjectManagerError, InvalidState
from elbepack.elbexml import ValidationError
from elbepack.db import ElbeDBError, InvalidLogin


# Import the Errors we try to catch wirh the
# soap_faults decorator


class SoapElbeDBError(Fault):
    def __init__(self, dberr):
        Fault.__init__(self, faultcode="ElbeDBError", faultstring=str(dberr))


class SoapElbeProjectError(Fault):
    def __init__(self, err):
        Fault.__init__(
            self,
            faultcode="ElbeProjectError",
            faultstring=str(err))


class SoapElbeAuthenticationFailed(Fault):
    def __init__(self):
        Fault.__init__(
            self,
            faultcode="ElbeAuthenticationFailed",
            faultstring="Authentication Failed")


class SoapElbeNotLoggedIn(Fault):
    def __init__(self):
        Fault.__init__(
            self,

            faultcode="ElbeNotLoggedIn",