def __init__(self, message, errors):

        _errorClass = message.split( "." )[-1]

        x = {
            "OCommandSQLParsingException": PyOrientSQLParsingException,
            "ODatabaseException": PyOrientDatabaseException,
            "OConfigurationException": PyOrientDatabaseException,
            "OCommandExecutorNotFoundException": PyOrientCommandException,
            "OSecurityAccessException": PyOrientSecurityAccessException,
            "ORecordDuplicatedException": PyOrientORecordDuplicatedException,
            "OSchemaException": PyOrientSchemaException,
            "OIndexException": PyOrientIndexException
        }

        # Override the exception Type with OrientDB exception map
        if x.keys() in _errorClass:
            self.__class__ = x[ _errorClass ]

        Exception.__init__(self, message)
        # errors is an array of tuple made this way:
        # ( java_exception_class,  message)
        self.errors = errors
dataset/ETHPy150Open mogui/pyorient/pyorient/exceptions.py/PyOrientException.__init__/swapped operands of `in`