Error generating instantiation.
@param error
@return
329436
public static KubernetesMessage response(String command, String error) {
        KubernetesResponse response = new KubernetesResponse();
        response.setCommand(command);
        response.setError(error);

        return new KubernetesMessage(response);
    }
117161
function InvalidSourceError(error) {
    var instance = new Error("An exception was thrown when making a request.");

    instance.name = "InvalidSourceError";
    instance.innerError = error;

    if (Object.setPrototypeOf) {
        Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
    }

    if (Error.captureStackTrace) {
        Error.captureStackTrace(instance, InvalidSourceError);
    }

    return instance;
}
434111
function createError(code, type, desc) {
	errors[code] = function (msg, meta) {
		const err = new type(msg);

		if (desc) {
			if (!meta) {
				meta = {};
			}
			meta.desc = desc;
		}

		return Object.defineProperties(err, {
			code: {
				configurable: true,
				enumerable: true,
				writable: true,
				value: `ERR_${code}`
			},
			meta: {
				configurable: true,
				value: meta || undefined,
				writable: true
			}
		});
	};

	Object.defineProperties(errors[code], {
		name: {
			configurable: true,
			value: code,
			writable: true
		},
		toString: {
			configurable: true,
			value: function toString() {
				return `ERR_${code}`;
			},
			writable: true
		}
	});
}
1256167
public void startError(String errorName) throws IOException {
        endUpdateIfNecessary();
        endChangesIfNecessary();
        ResponseWriter writer = getWrapped();
        writer.startElement("error", null);
        writer.startElement("error-name", null);
        writer.write(errorName);
        writer.endElement("error-name");
        writer.startElement("error-message", null);
        writer.startCDATA();
    }
1311325
private String createError(String errorMsg) {

        StringBuffer result = new StringBuffer();

        result.append("ERR");
        result.append(errorMsg);

        return result.toString();
    }
733818
public InternalObjectErrorBuilder createGlobalError(final String[] errorCodes) {
        
        String[] codes = new String[0];
        for(String errorCode : errorCodes) {
            codes = Utils.concat(codes, generateMessageCodes(errorCode));
        }
        
        return new InternalObjectErrorBuilder(this, getObjectName(), codes)
                .sheetName(getSheetName());
    }
835918
public static JsonObjectBase buildFieldError(Map<String, String> errors, Map<String, Object[]> argsMap,
                                                 ErrorCode statusCode) {

        JsonObjectError json = new JsonObjectError();
        json.setStatus(statusCode.getCode());

        for (String str : errors.keySet()) {

            try {
                json.addFieldError(str, contextReader.getMessage(errors.get(str), argsMap.get(str)));
            } catch (NoSuchMessageException e) {
                json.addFieldError(str, errors.get(str));
            }
        }

        LOG.info(json.toString());

        return json;
    }
1320937
public static <T, X extends Throwable> Try<T, X> failure(final X error) {
        return new Try<>(Either.left(
            error),new Class[0]);
    }
1194178
public void addError(Throwable error) {
        if (error == null) {
            throw new NullPointerException("Error cannot be null");
        }
        if (error instanceof AssumptionViolatedException) {
            AssertionError e = new AssertionError(error.getMessage());
            e.initCause(error);
            errors.add(e);
        } else {
            errors.add(error);
        }
    }
32061
function (error) {
        if (!this.started) {
            return;
        }

        var errorHandlers = this.errorHandlers,
            length = errorHandlers.length,
            errorHandler,
            errorHandled = false,
            errorString,
            i;

        //Exit handling
        if (error instanceof SystemExit) {
            this._exit(error.code);
            return;
        }

        try {
            for (i = 0; i < length; i += 1) {
                errorHandler = errorHandlers[i];
                errorHandled = !!errorHandler(error);

                if (errorHandled) {
                    return;
                }
            }
        } catch (e) {
            this._printError(e);
            this._exit(1);
        }

        //Default error handling
        errorString = '' + (error.stack || error);
        this._printError(errorString);
        this._exit(1);
    }
927564
function Error(message) {
  var error = new OriginalError(message)
  addNonEnumerableValue(error, '__trycatchcurrentStack__', trycatch.currentStack)
  return error
}
429313
public static JSError make(Node n, DiagnosticType type, String... arguments) {
    return new JSError(n.getSourceFileName(), n, type, arguments);
  }
710905
public void error(Object arg0, Throwable arg1)
    {
        message(ERROR,new Object[]{arg0,arg1},new Frame(1));
    }
556108
public static CompilationFailedException create(final IMessage[] errors) {

        final StringBuilder sb = new StringBuilder();
        sb.append("AJC compiler errors:").append(LINE_SEPARATOR);
        for (final IMessage error : errors) {
            sb.append(error.toString()).append(LINE_SEPARATOR);
        }

        return new CompilationFailedException(sb.toString());
    }
83986
public static CompletionException asCompletionException( Throwable error )
    {
        if ( error instanceof CompletionException )
        {
            return ((CompletionException) error);
        }
        return new CompletionException( error );
    }
290814
private static JavaScriptObject[] toNativeErrorArray(List<JSError> errors) {
    JavaScriptObject[] out = new JavaScriptObject[errors.size()];
    for (int i = 0; i < errors.size(); ++i) {
      JSError error = errors.get(i);
      DiagnosticType type = error.getType();
      out[i] = createError(error.sourceName, error.description, type != null ? type.key : null,
          error.lineNumber, error.getCharno());
    }
    return out;
  }
1131915
protected <V extends ATSecDBValidator> Set<ATError> createError(V validator, String key, String suffix, String defaultMessagePrefix, Object... arguments ) {
		Set<ATError> errors = new HashSet<>(1);
		if (null != validator) {
			errors.add(new ATError(key, 
					validator.getMessageWithSuffix(suffix, arguments, defaultMessagePrefix + StringUtils.join(arguments, ','))));
		} else if (null != messageSource) {
			errors.add(new ATError(key, 
					messageSource.getMessage(key, null, defaultMessagePrefix, LocaleContextHolder.getLocale())));
		} else {
			errors.add(new ATError(key, defaultMessagePrefix));
		}
		return errors;
	}