Get the error object. If we haven't already got one and
getErrorObjAttrName returns non-null create one and implant it in
the session.

@param request  Needed to locate session
@param messages Resources
@return ErrorEmitSvlt
342731
private ErrorEmitSvlt getErrorObj(final HttpServletRequest request,
                                    final MessageResources messages) {
    return (ErrorEmitSvlt)StrutsUtil.getErrorObj(getId(), this,
                                                 request,
                                                 messages,
                                                 getErrorObjAttrName(),
                                                 getErrorObjErrProp(),
                                                 noActionErrors,
                                                 clearMessages());
  }
284917
public static Message error(Entity entity, String key, String... args) {
        return message(MessageType.ERROR, entity, key, args);
    }
1316291
public RequestFuture<T> setRequest(Request<T> request) {
        this.request = request;
        this.request.addErrorListener(this);
        this.request.addResponseListener(this);
        return this;
    }
69142
protected MessageContext decodeSoapRequest(final HttpServletRequest request) {
        try {
            val decoder = new HTTPSOAP11Decoder();
            decoder.setParserPool(samlProfileHandlerConfigurationContext.getOpenSamlConfigBean().getParserPool());
            decoder.setHttpServletRequest(request);

            val binding = new BindingDescriptor();
            binding.setId(getClass().getName());
            binding.setShortName(getClass().getName());
            binding.setSignatureCapable(true);
            binding.setSynchronous(true);

            decoder.setBindingDescriptor(binding);
            decoder.initialize();
            decoder.decode();
            return decoder.getMessageContext();
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
        }
        return null;
    }
584450
protected LogoutHttpMessage getLogoutHttpMessageToSend(final SingleLogoutRequest request, final SingleLogoutMessage logoutMessage) {
        return new LogoutHttpMessage(request.getLogoutUrl(), logoutMessage.getPayload(), this.asynchronous);
    }
1079859
public VOMSErrorMessage[] errorMessages() {

    NodeList nodes = xmlResponse.getElementsByTagName("item");

    if (nodes.getLength() == 0)
      return null;

    List<VOMSErrorMessage> errorList = new ArrayList<VOMSErrorMessage>();

    for (int i = 0; i < nodes.getLength(); i++) {

      Element itemElement = (Element) nodes.item(i);

      Element numberElement = (Element) itemElement.getElementsByTagName(
        "number").item(0);
      Element messageElement = (Element) itemElement.getElementsByTagName(
        "message").item(0);

      int number = Integer.parseInt(numberElement.getFirstChild()
        .getNodeValue());
      if (number >= ERROR_OFFSET)
        errorList.add(new VOMSErrorMessage(number, messageElement
          .getFirstChild().getNodeValue()));

    }

    if (errorList.isEmpty())
      return null;

    return errorList.toArray(new VOMSErrorMessage[errorList.size()]);
  }
330984
public static Error getError(final Intent intent) {
		if (intent != null) {
			return (Error) intent.getParcelableExtra(Extras.ERROR);
		} else {
			return null;
		}
	}
154160
public static Map<String, String> getServerErrorMap(HttpServletRequest request, Exception e) {
        Map<String, String> attributes = new HashMap<>(4);
        attributes.put("code", "500");
        attributes.put("message", e.getMessage());
        String queryString = request.getQueryString();
        attributes.put("url", request.getRequestURI() + (Checker.isEmpty(queryString) ? "" : "?" + queryString));
        return attributes;
    }
783495
protected String getWarnMessageFromCookie(final HttpServletRequest request) {
    final Cookie cookie = getCookieByName(request, AZKABAN_WARN_MESSAGE);

    if (cookie == null) {
      return null;
    }
    return cookie.getValue();
  }
440603
function extractError(response, request) {

	var result,
	    entry,
	    req,
	    i;

	response = Blast.Bound.Array.cast(response);
	request = Blast.Bound.Array.cast(request);

	for (i = 0; i < response.length; i++) {
		entry = response[i];

		if (entry.error) {
			req = request[i] || {};
			result = new Error('Error in "' + req.type + '" command: ' + entry.error);
			result.type = req.type;
			result.vbmsg = entry.error;
			result.req = req;
			break;
		}
	}

	if (result) {
		result.original_response = response;
	}

	return result;
}
1177677
public String getErrorMessage() {

        StringBuffer result = new StringBuffer(512);

        String reason = m_messages.key(Messages.GUI_REASON_0, new Object[] {});

        if (CmsStringUtil.isNotEmpty(m_errorMessage)) {
            result.append(m_errorMessage);
            result.append("\n").append(reason).append(": ");
        }

        // if a localized message is already set as a parameter, append it.
        result.append(getMessage(m_throwable));
        // recursively append all error reasons to the message
        for (Throwable cause = m_throwable.getCause(); cause != null; cause = cause.getCause()) {
            result.append("\n").append(reason).append(": ");
            result.append(getMessage(cause));
        }
        return result.toString();
    }
400506
@Override
	protected void preparePaintComponent(final Request request) {
		if (getAttribute(ERROR_KEY) == null) {
			try {
				for (int i = 0; i < shim.getChildCount(); i++) {
					shim.getChildAt(i).preparePaint(request);
				}
			} catch (final Exception e) {
				if (isAjaxOrTargetedRequest(request)) {
					throw new SystemException(e.getMessage(), e);
				} else {
					setAttribute(ERROR_KEY, e);
				}
			}
		}
	}
1364412
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {

		ActionErrors errors = null;
		// has the maximum length been exceeded?
		Boolean maxLengthExceeded = (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
		if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue())) {
			errors = new ActionErrors();
			errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new ActionMessage("maxLengthExceeded"));
		} else if (fileMap.size() > MAX_IMAGES_COUNT) {
			errors = new ActionErrors();
			errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new ActionMessage("maxLengthExceeded"));
		} else {
			// retrieve the file name
			Iterator iter = fileMap.values().iterator();
			while (iter.hasNext()) {
				FormFile file = (FormFile) iter.next();
				String fileName = file.getFileName();
				if ((!fileName.toLowerCase().endsWith(".gif")) && !(fileName.toLowerCase().endsWith(".jpg"))
						&& !(fileName.toLowerCase().endsWith(".png"))) {
					errors = new ActionErrors();
					errors.add("notImage", new ActionMessage("notImage"));
				}
			}
		}
		return errors;
	}
1251265
function getErrorMessage (err, target, defaultMsg) {
    var errMessage;
    if (err) {
        errMessage = err.toString();
    } else {
        errMessage = defaultMsg;
    }
    return errMessage.replace('%target%', target);
}
669655
@SuppressWarnings({"unused", "WeakerAccess"})
    public void pushError(final String errorMessage, final int errorCode) {
        final HashMap<String, Object> props = new HashMap<>();
        props.put("Error Message", errorMessage);
        props.put("Error Code", errorCode);

        try {
            final String activityName = getCurrentActivityName();
            if (activityName != null) {
                props.put("Location", activityName);
            } else {
                props.put("Location", "Unknown");
            }
        } catch (Throwable t) {
            // Ignore
            props.put("Location", "Unknown");
        }

        pushEvent("Error Occurred", props);
    }
1179301
@Override
    public PortletEventQueue getPortletEventQueue(HttpServletRequest request) {
        request = this.portalRequestUtils.getOriginalPortalRequest(request);

        synchronized (PortalWebUtils.getRequestAttributeMutex(request)) {
            PortletEventQueue portletEventQueue =
                    (PortletEventQueue) request.getAttribute(PORTLET_EVENT_QUEUE);
            if (portletEventQueue == null) {
                portletEventQueue = new PortletEventQueue();
                request.setAttribute(PORTLET_EVENT_QUEUE, portletEventQueue);
            }
            return portletEventQueue;
        }
    }
1039033
function (errorMessage) {

            var msg = null;

            for (var i = 0; i < errorMessage.length; i++) {
                if (msg === null && errorMessage[i]) {
                    msg = errorMessage[i];
                }
            }

            return msg;
        }