Returns true if an error needs to be reported for a given
source name and pos.
778247
protected boolean shouldReport(JavaFileObject file, int pos) {
        if (file == null)
            return true;

        Pair<JavaFileObject,Integer> coords = new Pair<>(file, pos);
        boolean shouldReport = !recorded.contains(coords);
        if (shouldReport)
            recorded.add(coords);
        return shouldReport;
    }
1272811
public void error(Error errorKey) {
        report(diags.error(null, source, null, errorKey));
    }
573373
def _on_report_error(self, code, message, connection_id):
        """"""
        self._logger.critical(
            "Error receiving reports, no more reports will be processed on this adapter, code=%d, msg=%s", code, message
        )
392851
private boolean havePropogatedError() {
		Request req = getRequest();
		return req != null && req.getAttribute(ACTION_ERROR_KEY) != null;
	}
886197
def error (self, msg, pos=None):
    """"""
    self.log(msg, 'error: ' + self.location(pos))
1338200
public void warning(int pos, Warning warningKey) {
        report(diags.warning(null, source, wrap(pos), warningKey));
    }
327001
function report_error(Err, EventName, CallbackID) {
			// Construct the error object that we will be returning.
			var error = {
				event: EventName,
				callback_id: CallbackID,
				timestamp: Date.now(),
				message: ''
			};
			if (!Err) { error.message = 'Unknown error.'; }
			else if (Err.message) { error.message = Err.message; }
			else { error.message = Err; }
			// Output to the logger.
			if (Logger) { Logger.LogError('Error in [' + EventName + ']: ', error); }
			// Always send using the 'server_error' message.
			Socket.emit('server_error', error);
			// Propagate the error downstream to the caller.
			if (CallbackID) { Socket.emit(EventName + '.' + CallbackID, error, null); }
			// Return the error object.
			return error;
		}
1095516
private void checkFail(String errorMsg) throws IOException {
    if (fsNamesys.failOnTxIdMismatch()) {
      FSEditLog.LOG.error(errorMsg);
      throw new IOException(errorMsg);
    }
    MetaRecoveryContext.editLogLoaderPrompt(errorMsg);
  }
624944
def has_error(self):
        
        return next(
            (True for cr in self.component_results
             if cr.has_error()),
            False
        )
613936
public static boolean isStarQualifiedName(String name) {
    return name != null
        && name.endsWith(".*")
        && isQualifiedName(name.substring(0, name.length() - 2));
  }
1323460
def check_error(self, response, status, err_cd):
        " "

        if 'status' not in response:
            return False

        if response['status'] != status:
            return False

        if 'msgs' not in response:
            return False

        if not isinstance(response['msgs'], list):
            return False

        for msg in response['msgs']:

            if 'LVL' in msg and msg['LVL'] != 'ERROR':
                continue

            if 'ERR_CD' in msg and msg['ERR_CD'] == err_cd:
                return True

        return False
229913
def is_valid_name_error(name: str, node: Node = None) -> Optional[GraphQLError]:
    """"""
    if not isinstance(name, str):
        raise TypeError("Expected string")
    if name.startswith("__"):
        return GraphQLError(
            f"Name {name!r} must not begin with '__',"
            " which is reserved by GraphQL introspection.",
            node,
        )
    if not re_name.match(name):
        return GraphQLError(
            f"Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but {name!r} does not.", node
        )
    return None
803322
@Override
	public void error(String message, String sourceName, int line, String lineSource, int lineOffset) {

		// Only log the first error...
		if (this.errorLine < 1) {
			this.errorLine = line;
			this.yuiErrorMessage = message;
		} else if (this.errorLine == line) {
			this.yuiErrorMessage += "] [" + message;
		}
	}
58913
public boolean hasError() {

        A_CmsReportThread thread = OpenCms.getThreadStore().retrieveThread(m_paramThread);
        if (thread != null) {
            return thread.hasError();
        } else {
            return false;
        }
    }
215282
public void report(DiagnosticPosition pos, String msg, Object... args) {
        JavaFileObject currentSource = log.currentSourceFile();

        if (verbose) {
            if (sourcesWithReportedWarnings == null)
                sourcesWithReportedWarnings = new HashSet<JavaFileObject>();

            if (log.nwarnings < log.MaxWarnings) {
                // generate message and remember the source file
                logMandatoryWarning(pos, msg, args);
                sourcesWithReportedWarnings.add(currentSource);
            } else if (deferredDiagnosticKind == null) {
                // set up deferred message
                if (sourcesWithReportedWarnings.contains(currentSource)) {
                    // more errors in a file that already has reported warnings
                    deferredDiagnosticKind = DeferredDiagnosticKind.ADDITIONAL_IN_FILE;
                } else {
                    // warnings in a new source file
                    deferredDiagnosticKind = DeferredDiagnosticKind.IN_FILE;
                }
                deferredDiagnosticSource = currentSource;
                deferredDiagnosticArg = currentSource;
            } else if ((deferredDiagnosticKind == DeferredDiagnosticKind.IN_FILE
                        || deferredDiagnosticKind == DeferredDiagnosticKind.ADDITIONAL_IN_FILE)
                       && !equal(deferredDiagnosticSource, currentSource)) {
                // additional errors in more than one source file
                deferredDiagnosticKind = DeferredDiagnosticKind.ADDITIONAL_IN_FILES;
                deferredDiagnosticArg = null;
            }
        } else {
            if (deferredDiagnosticKind == null) {
                // warnings in a single source
                deferredDiagnosticKind = DeferredDiagnosticKind.IN_FILE;
                deferredDiagnosticSource = currentSource;
                deferredDiagnosticArg = currentSource;
            }  else if (deferredDiagnosticKind == DeferredDiagnosticKind.IN_FILE &&
                        !equal(deferredDiagnosticSource, currentSource)) {
                // warnings in multiple source files
                deferredDiagnosticKind = DeferredDiagnosticKind.IN_FILES;
                deferredDiagnosticArg = null;
            }
        }
    }
83304
private boolean isError(Object result) {
		if(result != null){
			if(result instanceof BaseResult){
				BaseResult baseResult = (BaseResult)result;
				return !baseResult.isSuccess();
			}else if(result instanceof MchBase){
				MchBase mchBase = (MchBase)result;
				if("FAIL".equalsIgnoreCase(mchBase.getReturn_code())||
				   "FAIL".equalsIgnoreCase(mchBase.getResult_code())){
					return true;
				}
			}
		}
		return false;
	}
176441
protected boolean checkNewEntry(String name, int arrayPosition) {

        m_errorMessages.clear();
        boolean inArray = false;
        if (getTypes(false)[arrayPosition] != null) {
            inArray = true;
        }
        if (!inArray) {
            m_errorMessages.add(key(Messages.ERR_PERMISSION_SELECT_TYPE_0));
        }
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(name)) {
            m_errorMessages.add(key(Messages.ERR_MISSING_GROUP_OR_USER_NAME_0));
        }
        if (m_errorMessages.size() > 0) {
            return false;
        }
        return true;
    }