def qteRunHook(self, hookName: str, msgObj: QtmacsMessage=None):
        reg = self._qteRegistryHooks
        if hookName not in reg:
            return
        if msgObj is None:
            msgObj = QtmacsMessage()
        msgObj.setHookName(hookName)
        for fun in reg[hookName]:
            try:
                fun(msgObj)
            except Exception as err:
                msg = '<b>{}</b>-hook function <b>{}</b>'.format(
                    hookName, str(fun)[1:-1])
                msg += " did not execute properly."
                if isinstance(err, QtmacsArgumentError):
                    msg += '<br/>' + str(err)
                self.qteLogger.exception(msg, exc_info=True, stack_info=True)