def check_errors(self, errors_to_ignore=None) -> None:
        """
        Checks the instrument for errors.
        """
        errors = json.loads(self.getv('raw/error/json/errors'))

        # If this is the first time we are called, log the detected errors,
        # but don't raise any exceptions
        if self._errors is None:
            raise_exceptions = False
            self._errors = {}
        else:
            raise_exceptions = True

        # Asserted in case errors were found
        found_errors = False

        # Combine errors_to_ignore with commandline
        _errors_to_ignore = copy.copy(self._errors_to_ignore)
        if errors_to_ignore is not None:
            _errors_to_ignore += errors_to_ignore

        # Go through the errors and update our structure, raise exceptions if
        # anything changed
        for m in errors['messages']:
            code     = m['code']
            count    = m['count']
            severity = m['severity']
            message  = m['message']

            if not raise_exceptions:
                self._errors[code] = {
                    'count'   : count,
                    'severity': severity,
                    'message' : message}
                log.warning(f'{self.devname}: Code {code}: "{message}" ({severity})')
            else:
                # Check if there are new errors
                if code not in self._errors or count > self._errors[code]['count']:
                    if code in _errors_to_ignore:
                        log.warning(f'{self.devname}: {message} ({code}/{severity})')
                    else:
                        log.error(f'{self.devname}: {message} ({code}/{severity})')
                        found_errors = True

                if code in self._errors:
                    self._errors[code]['count'] = count
                else:
                    self._errors[code] = {
                        'count'   : count,
                        'severity': severity,
                        'message' : message}

        if found_errors:
            raise zibase.ziRuntimeError('Errors detected during run-time!')