Static factory method to stop IDEs from auto-completing ClassGraphException after "new ClassGraph".

@param message
the message
@param cause
the cause
@return the ClassGraphException
@throws ClassGraphException
the class graph exception
18259
public static ClassGraphException newClassGraphException(final String message, final Throwable cause)
            throws ClassGraphException {
        return new ClassGraphException(message, cause);
    }
465627
public final Trace warn(Class<?> c, String message) {
        return _trace.warn(c, message);
    }
529081
@SuppressWarnings({"static-method", "checkstyle:regexp"})
	public void logDebugMessage(String message, Throwable cause) {
		Debug.println(message);
		if (cause != null) {
			Debug.printStackTrace(cause);
		}
	}
138470
@Override
    @SuppressFBWarnings("DM_EXIT")
    public void logError(String message, Throwable e) {
        if (e instanceof MissingClassException) {
            MissingClassException missingClassEx = (MissingClassException) e;
            ClassNotFoundException cnfe = missingClassEx.getClassNotFoundException();

            reportMissingClass(cnfe);
            // Don't report dataflow analysis exceptions due to missing classes.
            // Too much noise.
            return;

        }
        if (e instanceof MethodUnprofitableException) {
            // TODO: log this
            return;
        }
        System.err.println("Error: " + message);
        e.printStackTrace();
        System.exit(1);
    }
956801
@Override
    public void doExceptionCaughtListeners(final Throwable cause) {
        runManagementTask(new Runnable() {
            @Override
            public void run() {
                try {
                    List<SessionManagementListener> sessionListeners = getManagementListeners();
                    for (final SessionManagementListener listener : sessionListeners) {
                        listener.doExceptionCaught(SessionManagementBeanImpl.this, cause);
                    }

                    markChanged();
                } catch (Exception ex) {
                    logger.warn("Error during doExceptionCaught session listener notifications:", ex);
                }
            }
        });
    }
1218449
public void javacError(String message, Throwable t) {
		messager.printMessage(Diagnostic.Kind.ERROR, message + (t == null ? "" : (": " + t)));
		if (t != null) t.printStackTrace();
	}
132195
public final Trace warn(Class<?> c, String message, Throwable t) {
        return _trace.warn(c, message, t);
    }
1012626
public static UnexpectedException unexpected(Throwable cause, String msg, Object... args) {
        throw new UnexpectedException(cause, msg, args);
    }
673059
@Override public void addError(String message) {
		ast.printMessage(Diagnostic.Kind.ERROR, message, this, null, true);
	}
313111
public void         add(Type type, String message, Throwable exception)
    {
        String          queueMessage = message;
        if ( (type == Type.ERROR) && (exception != null) )
        {
            queueMessage += " (" + getExceptionMessage(exception) + ")";
        }

        if ( type.addToUI() )
        {
            while ( queue.size() > windowSizeLines )  // NOTE: due to concurrency, this may make the queue shorter than MAX - that's OK (and in some cases longer)
            {
                queue.remove();
            }
            queue.add(new Message(queueMessage, type));
        }
        type.log(message, exception);
    }
1181252
public final PersistException toPersistException(final String message) {
        Throwable cause;
        if (this instanceof PersistException) {
            cause = this;
        } else {
            cause = getCause();
        }

        if (cause == null) {
            cause = this;
        } else if (cause instanceof PersistException && message == null) {
            return (PersistException) cause;
        }

        String causeMessage = cause.getMessage();
        if (causeMessage == null) {
            causeMessage = message;
        } else if (message != null) {
            causeMessage = message + " : " + causeMessage;
        }

        return makePersistException(causeMessage, cause);
    }
1061373
public static DiffException createDiffException(final ErrorKeys errorId,
			final String message)
	{

		return new DiffException(errorId.toString() + ":\r\n" + message);
	}
315345
public static void error(String message) {
    errorMessages.add(message);
    errorStream.println(getFullMessage("error: ", message, CLANG_STYLE_ERROR_MSG));
    errorCount++;
  }
638646
public void add(String message, IOException cause) {
        causes.add(new IOException(message, cause));
    }
1212354
private UninitializedMessageException
      newUninitializedMessageException(MessageType message) {
    if (message instanceof AbstractMessageLite) {
      return ((AbstractMessageLite) message).newUninitializedMessageException();
    }
    return new UninitializedMessageException(message);
  }
1097413
public static ProofViewException fromThrowable(Throwable cause) {
    return (cause instanceof ProofViewException)
                   ? (ProofViewException) cause
                   : new ProofViewException(cause);
  }
1188486
MessageToClient _createMessageToClient(MessageFromClient message, T session) {
		MessageToClient messageToClient = new MessageToClient();
		messageToClient.setId(message.getId());
		try {
			Class cls = Class.forName(message.getDataService());
			Object dataService = this.getDataService(session, cls);
			logger.debug("Process message {}", message);
			List<Object> arguments = getArrayList();
			Method method = methodServices.getMethodFromDataService(cls, message, arguments);
			injectSession(method.getParameterTypes(), arguments, session);
			messageToClient.setResult(method.invoke(dataService, arguments.toArray()));
			if (method.isAnnotationPresent(JsonMarshaller.class)) {
				messageToClient.setJson(argumentServices.getJsonResultFromSpecificMarshaller(method.getAnnotation(JsonMarshaller.class), messageToClient.getResponse()));
			}
			try {
				Method nonProxiedMethod = methodServices.getNonProxiedMethod(cls, method.getName(), method.getParameterTypes());
				messageToClient.setDeadline(cacheManager.processCacheAnnotations(nonProxiedMethod, message.getParameters()));
			} catch (NoSuchMethodException ex) {
				logger.error("Fail to process extra annotations (JsCacheResult, JsCacheRemove) for method : " + method.getName(), ex);
			}
			logger.debug("Method {} proceed messageToClient : {}.", method.getName(), messageToClient);
		} catch (InvocationTargetException ex) {
			Throwable cause = ex.getCause();
			if (ConstraintViolationException.class.isInstance(cause)) {
				messageToClient.setConstraints(constraintServices.extractViolations((ConstraintViolationException) cause));
			} else {
				messageToClient.setFault(faultServices.buildFault(cause));
			}
		} catch (Throwable ex) {
			messageToClient.setFault(faultServices.buildFault(ex));
		}
		return messageToClient;
	}