Creates a JSError with no source information and a non-default level.

@param level
@param type The DiagnosticType
@param arguments Arguments to be incorporated into the message
965788
public static JSError make(CheckLevel level, DiagnosticType type, String... arguments) {
    return new JSError(null, null, -1, -1, type, level, arguments);
  }
437768
private void init(Class<?> type) {

    ParameterizedType parameterizedType =
      stream(nullSafeArray(type.getGenericInterfaces(), Type.class))
        .filter(this::isParameterizedFunctionType)
        .findFirst()
        .map(it -> (ParameterizedType) it)
        .orElseGet(() -> {

          Type genericSuperclass = type.getGenericSuperclass();

          return isParameterizedFunctionType(genericSuperclass) ? (ParameterizedType) genericSuperclass : null;

        });

    this.sourceType = parameterizedType != null
      ? ClassUtils.toRawType(parameterizedType.getActualTypeArguments()[0])
      : Object.class;

    this.targetType = parameterizedType != null
      ? ClassUtils.toRawType(parameterizedType.getActualTypeArguments()[1])
      : Object.class;
  }
352848
public static void error(Log log, Throwable e, String format, Object... arguments) {
		if (false == log(log, Level.ERROR, e, format, arguments)) {
			log.error(e, format, arguments);
		}
	}
1327846
function (type, error = null, id = null) {
    type = type.toUpperCase()
    let errors = {
        'NO_DATA': 'No info for that id yet. Or maybe the data provided was wrong.',
        'BUSY': 'The server providing the info is busy right now. Try again.',
        'UNAVAILABLE': 'The server providing the info is unavailable right now. Try again later.',
        'EMPTY': 'The provider server was parsed correctly, but has no data to show. Try Again later.',
        'DOWN': 'The provider server is currently down. Try Again later.',
        'PARSER': 'Something went wrong when parsing the provider website.',
        'ACTION_REQUIRED': 'That tracker requires an aditional step in their website.'
    }

    let message = error != null ? error : errors[type]
    message = id != null ? message + ' ID:' + id : message
    return new Error(type + ' - ' + message)
}
945518
@SuppressWarnings("static-method")
	protected void initialize(SarlSpace source, JvmGenericType inferredJvmType) {
		// Issue #356: do not generate if the space has no name.
		assert source != null;
		assert inferredJvmType != null;
		if (Strings.isNullOrEmpty(source.getName())) {
			return;
		}
	}
585241
@Override
    public void error(String code, Object... arguments)
        throws NullPointerException, IllegalArgumentException {

        this.store.add(Level.ERROR, resolveMessage(code, arguments));
    }
880918
function CruxLogger(_type, _level) {
  if (this instanceof CruxLogger) {
    Component.apply(this, arguments);
    this.name = 'log';
    var hasColors = this.config.colors;
    delete this.config.colors;
    if (!hasColors) {
      for (var i = 0; i < this.config.appenders.length; i++) {
        this.config.appenders[i].layout = {
          type: 'basic'
        }
      }
    }
    log4js.configure(this.config);
    this.__logger = log4js.getLogger();
    this.__logger.setLevel(this.config.level.toUpperCase());
    global['log'] = this.__logger;
  } else {  // In case we just called crux.Log(), we just want to return an instance of log4js
    this.__logger = log4js.getLogger(_type || 'default');
    if (typeof _level === 'string') {
      this.__logger.setLevel(_level);
    }
    return this.__logger;
  }
}
526076
public void error(Throwable error, Map<String, Object> custom) {
    log(error, custom, null, Level.ERROR);
  }
597640
public static DiagnosticType make(String name, CheckLevel level,
                                    String descriptionFormat) {
    return
        new DiagnosticType(name, level, new MessageFormat(descriptionFormat));
  }
609931
function create (type) {
  return (content, msg = {}) => {
    if (typeof msg === 'string') msg = { type: msg }
    if (type) msg.type = type

    msg.id = nextUid()
    msg.content = content
    msg.duration = msg.duration !== undefined
      ? msg.duration
      : (msg.type === 'error' || msg.type === 'danger') ? 0 : 5
    if (msg.exclusive) {
      container.showMessage(msg)
    } else {
      container.addMessage(msg)
    }
  }
}
1133310
protected static Event.Level formatLevel(Level level) {
        if (level.isGreaterOrEqual(Level.ERROR)) {
            return Event.Level.ERROR;
        } else if (level.isGreaterOrEqual(Level.WARN)) {
            return Event.Level.WARNING;
        } else if (level.isGreaterOrEqual(Level.INFO)) {
            return Event.Level.INFO;
        } else if (level.isGreaterOrEqual(Level.ALL)) {
            return Event.Level.DEBUG;
        } else {
            return null;
        }
    }
521154
public void setParameterType(String type) {
		String typeName;
		if (Strings.isEmpty(type)) {
			typeName = Object.class.getName();
		} else {
			typeName = type;
		}
		this.parameter.setParameterType(newTypeRef(this.context, typeName));
	}
860184
public void newarray(TypeMirror type, int count) throws IOException
    {
        if (type.getKind() != TypeKind.ARRAY)
        {
            throw new IllegalArgumentException(type+" is not array");
        }
        ArrayType at = (ArrayType) type;
        iconst(count);
        TypeMirror ct = at.getComponentType();
        switch (ct.getKind())
        {
            case BOOLEAN:
                newarray(T_BOOLEAN);
                break;
            case CHAR:
                newarray(T_CHAR);
                break;
            case FLOAT:
                newarray(T_FLOAT);
                break;
            case DOUBLE:
                newarray(T_DOUBLE);
                break;
            case BYTE:
                newarray(T_BYTE);
                break;
            case SHORT:
                newarray(T_SHORT);
                break;
            case INT:
                newarray(T_INT);
                break;
            case LONG:
                newarray(T_LONG);
                break;
            case DECLARED:
            {
                DeclaredType dt = (DeclaredType) ct;
                int index = subClass.resolveClassIndex((TypeElement)dt.asElement());
                anewarray(index);
            }
                break;
            default:
                throw new IllegalArgumentException(type+" not supported");
        }
    }
514710
public void typeMissing() {
		this.parameterMissing(
				ProtocolConstants.Parameters.Create.TYPE,
				"Please provide the type of the create request. Use \""
						+ CreateRequestType.USER.getIdentifier()
						+ "\" to create a user, \""
						+ CreateRequestType.FOLLOW.getIdentifier()
						+ "\" to create a follow edge or \""
						+ CreateRequestType.STATUS_UPDATE.getIdentifier()
						+ "\" to create a status update.");
	}
99302
public void error(Throwable error, String description) {
    log(error, null, description, Level.ERROR);
  }
756688
protected void report(DiagnosticType diagnostic, Node n) {
    JSError error = JSError.make(n, diagnostic, n.toString());
    compiler.report(error);
  }
591356
public static StoreException create(final Type type, final Throwable cause, final String errorMessage) {
        Preconditions.checkArgument(cause != null || (errorMessage != null && !errorMessage.isEmpty()),
                "Either cause or errorMessage should be non-empty");
        StoreException exception;
        switch (type) {
            case DATA_EXISTS:
                exception = new DataExistsException(errorMessage, cause);
                break;
            case DATA_NOT_FOUND:
                exception = new DataNotFoundException(errorMessage, cause);
                break;
            case DATA_CONTAINS_ELEMENTS:
                exception = new DataNotEmptyException(errorMessage, cause);
                break;
            case WRITE_CONFLICT:
                exception = new WriteConflictException(errorMessage, cause);
                break;
            case ILLEGAL_STATE:
                exception = new IllegalStateException(errorMessage, cause);
                break;
            case OPERATION_NOT_ALLOWED:
                exception = new OperationNotAllowedException(errorMessage, cause);
                break;
            case CONNECTION_ERROR:
                exception = new StoreConnectionException(errorMessage, cause);
                break;
            case UNKNOWN:
                exception = new UnknownException(errorMessage, cause);
                break;
            default:
                throw new IllegalArgumentException("Invalid exception type");
        }
        return exception;
    }