# 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
        return wrapped
    if func.__code__.co_argcount == 4:
        @wraps(func)
        def wrapped(self, arg1, arg2, arg3):
            try:
                return func(self, arg1, arg2, arg3)
            except InvalidState as e:
                raise SoapElbeInvalidState()
            except ProjectManagerError as e:
                raise SoapElbeProjectError(str(e))
            except ElbeDBError as e:
                raise SoapElbeDBError(str(e))
            except OSError as e:
                raise SoapElbeProjectError("OSError: " + str(e))
            except ValidationError as e:
                raise SoapElbeValidationError(e)
            except InvalidLogin:
                raise SoapElbeNotAuthorized()
            except Exception as e:
                raise SoapElbeProjectError(format_exc())
        return wrapped
    if func.__code__.co_argcount == 5:
        @wraps(func)
        def wrapped(self, arg1, arg2, arg3, arg4):
            try:
                return func(self, arg1, arg2, arg3, arg4)
            except InvalidState as e:
                raise SoapElbeInvalidState()
            except ProjectManagerError as e:
                raise SoapElbeProjectError(str(e))

# 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

        return wrapped
    if func.__code__.co_argcount == 4:
        @wraps(func)
        def wrapped(self, arg1, arg2, arg3):
            try:
                return func(self, arg1, arg2, arg3)
            except InvalidState as e:
                raise SoapElbeInvalidState()
            except ProjectManagerError as e:
                raise SoapElbeProjectError(str(e))
            except ElbeDBError as e:
                raise SoapElbeDBError(str(e))
            except OSError as e:
                raise SoapElbeProjectError("OSError: " + str(e))
            except ValidationError as e:
                raise SoapElbeValidationError(e)
            except InvalidLogin:
                raise SoapElbeNotAuthorized()
            except Exception as e:
                raise SoapElbeProjectError(format_exc())
        return wrapped
    if func.__code__.co_argcount == 5:
        @wraps(func)
        def wrapped(self, arg1, arg2, arg3, arg4):
            try:
                return func(self, arg1, arg2, arg3, arg4)
            except InvalidState as e:
                raise SoapElbeInvalidState()
            except ProjectManagerError as e:
                raise SoapElbeProjectError(str(e))

            except ElbeDBError as e: