def error(self, msg: str) -> None:
        """
        Write an error message to the Windows Application log
        (± to the Python disk log).
        """
        # noinspection PyUnresolvedReferences
        servicemanager.LogErrorMsg(str(msg))
        if self.debugging:
            log.error(msg)