com.intellij.execution.configurations.RuntimeConfigurationError Java Examples

The following examples show how to use com.intellij.execution.configurations.RuntimeConfigurationError. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BazelTestLaunchState.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public static BazelTestLaunchState create(@NotNull ExecutionEnvironment env, @NotNull BazelTestConfig config) throws ExecutionException {
  final BazelTestFields fields = config.getFields();
  try {
    fields.checkRunnable(env.getProject());
  }
  catch (RuntimeConfigurationError e) {
    throw new ExecutionException(e);
  }
  FileDocumentManager.getInstance().saveAllDocuments();

  final VirtualFile virtualFile = fields.getFile();

  final BazelTestLaunchState launcher = new BazelTestLaunchState(env, config, virtualFile);
  final Workspace workspace = FlutterModuleUtils.getFlutterBazelWorkspace(env.getProject());
  if (workspace != null) {
    DaemonConsoleView.install(launcher, env, workspace.getRoot());
  }
  return launcher;
}
 
Example #2
Source File: TestLaunchState.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
static TestLaunchState create(@NotNull ExecutionEnvironment env, @NotNull TestConfig config) throws ExecutionException {
  final TestFields fields = config.getFields();
  try {
    fields.checkRunnable(env.getProject());
  }
  catch (RuntimeConfigurationError e) {
    throw new ExecutionException(e);
  }
  FileDocumentManager.getInstance().saveAllDocuments();

  final VirtualFile fileOrDir = fields.getFileOrDir();
  assert (fileOrDir != null);

  final PubRoot pubRoot = fields.getPubRoot(env.getProject());
  assert (pubRoot != null);

  final FlutterSdk sdk = FlutterSdk.getFlutterSdk(env.getProject());
  assert (sdk != null);
  final boolean testConsoleEnabled = sdk.getVersion().flutterTestSupportsMachineMode();

  final TestLaunchState launcher = new TestLaunchState(env, config, fileOrDir, pubRoot, testConsoleEnabled);
  DaemonConsoleView.install(launcher, env, pubRoot.getRoot());
  return launcher;
}
 
Example #3
Source File: HaskellRunConfigurationBase.java    From intellij-haskforce with Apache License 2.0 6 votes vote down vote up
protected void requireCabalVersionMinimum(double minimumVersion, @NotNull String errorMessage) throws RuntimeConfigurationException {
    final HaskellBuildSettings buildSettings = HaskellBuildSettings.getInstance(getProject());
    final String cabalPath = buildSettings.getCabalPath();
    if (cabalPath.isEmpty()) {
        throw new RuntimeConfigurationError("Path to cabal is not set.");
    }
    GeneralCommandLine cabalCmdLine = new GeneralCommandLine(cabalPath, "--numeric-version");
    Either<ExecUtil.ExecError, String> result = ExecUtil.readCommandLine(cabalCmdLine);
    if (result.isLeft()) {
        //noinspection ThrowableResultOfMethodCallIgnored
        ExecUtil.ExecError e = EitherUtil.unsafeGetLeft(result);
        NotificationUtil.displaySimpleNotification(
            NotificationType.ERROR, getProject(), "cabal", e.getMessage()
        );
        throw new RuntimeConfigurationError("Failed executing cabal to check its version: " + e.getMessage());
    }
    final String out = EitherUtil.unsafeGetRight(result);
    final Matcher m = EXTRACT_CABAL_VERSION_REGEX.matcher(out);
    if (!m.find()) {
        throw new RuntimeConfigurationError("Could not parse cabal version: '" + out + "'");
    }
    final Double actualVersion = Double.parseDouble(m.group(1));
    if (actualVersion < minimumVersion) {
        throw new RuntimeConfigurationError(errorMessage);
    }
}
 
Example #4
Source File: TestLaunchState.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
static TestLaunchState create(@NotNull ExecutionEnvironment env, @NotNull TestConfig config) throws ExecutionException {
  final TestFields fields = config.getFields();
  try {
    fields.checkRunnable(env.getProject());
  }
  catch (RuntimeConfigurationError e) {
    throw new ExecutionException(e);
  }
  FileDocumentManager.getInstance().saveAllDocuments();

  final VirtualFile fileOrDir = fields.getFileOrDir();
  assert (fileOrDir != null);

  final PubRoot pubRoot = fields.getPubRoot(env.getProject());
  assert (pubRoot != null);

  final FlutterSdk sdk = FlutterSdk.getFlutterSdk(env.getProject());
  assert (sdk != null);
  final boolean testConsoleEnabled = sdk.getVersion().flutterTestSupportsMachineMode();

  final TestLaunchState launcher = new TestLaunchState(env, config, fileOrDir, pubRoot, testConsoleEnabled);
  DaemonConsoleView.install(launcher, env, pubRoot.getRoot());
  return launcher;
}
 
Example #5
Source File: BazelTestLaunchState.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public static BazelTestLaunchState create(@NotNull ExecutionEnvironment env, @NotNull BazelTestConfig config) throws ExecutionException {
  final BazelTestFields fields = config.getFields();
  try {
    fields.checkRunnable(env.getProject());
  }
  catch (RuntimeConfigurationError e) {
    throw new ExecutionException(e);
  }
  FileDocumentManager.getInstance().saveAllDocuments();

  final VirtualFile virtualFile = fields.getFile();

  final BazelTestLaunchState launcher = new BazelTestLaunchState(env, config, virtualFile);
  final Workspace workspace = FlutterModuleUtils.getFlutterBazelWorkspace(env.getProject());
  if (workspace != null) {
    DaemonConsoleView.install(launcher, env, workspace.getRoot());
  }
  return launcher;
}
 
Example #6
Source File: SdkFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Reports any errors that the user should correct.
 * <p>This will be called while the user is typing; see RunConfiguration.checkConfiguration.
 *
 * @throws RuntimeConfigurationError for an error that that the user must correct before running.
 */
void checkRunnable(@NotNull Project project) throws RuntimeConfigurationError {
  // TODO(pq): consider validating additional args values
  checkSdk(project);
  final MainFile.Result main = MainFile.verify(filePath, project);
  if (!main.canLaunch()) {
    throw new RuntimeConfigurationError(main.getError());
  }
  if (PubRootCache.getInstance(project).getRoot(main.get().getAppDir()) == null) {
    throw new RuntimeConfigurationError("Entrypoint isn't within a Flutter pub root");
  }
}
 
Example #7
Source File: TestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull TestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  final VirtualFile dir = fields.getFileOrDir();
  if (dir == null) {
    throw new RuntimeConfigurationError("Directory not found");
  }
  final PubRoot root = PubRoot.forDescendant(dir, project);
  if (root == null) {
    throw new RuntimeConfigurationError("Directory is not in a pub root");
  }
}
 
Example #8
Source File: BazelTestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull BazelTestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  // check that bazel target is not empty
  if (StringUtil.isEmptyOrSpaces(fields.getBazelTarget())) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.noTargetSet"));
  }
  // check that the bazel target starts with "//"
  if (!fields.getBazelTarget().startsWith("//")) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.startWithSlashSlash"));
  }
}
 
Example #9
Source File: BazelTestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull BazelTestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  // The new bazel test runner could not be found.
  final Workspace workspace = fields.getWorkspace(project);
  if (workspace == null || workspace.getTestScript() == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.newBazelTestRunnerUnavailable"),
                                        () -> FlutterSettingsConfigurable.openFlutterSettings(project));
  }

  fields.verifyMainFile(project);
}
 
Example #10
Source File: SdkAttachConfig.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void checkRunnable(@NotNull Project project) throws RuntimeConfigurationError {
  final DartSdk sdk = DartPlugin.getDartSdk(project);
  if (sdk == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"),
                                        () -> DartConfigurable.openDartSettings(project));
  }
  final MainFile.Result main = MainFile.verify(getFields().getFilePath(), project);
  if (!main.canLaunch()) {
    throw new RuntimeConfigurationError(main.getError());
  }
  if (PubRoot.forDirectory(main.get().getAppDir()) == null) {
    throw new RuntimeConfigurationError("Entrypoint isn't within a Flutter pub root");
  }
}
 
Example #11
Source File: SdkFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private static void checkSdk(@NotNull Project project) throws RuntimeConfigurationError {
  // TODO(skybrian) shouldn't this be flutter SDK?

  final DartSdk sdk = DartPlugin.getDartSdk(project);
  if (sdk == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"),
                                        () -> DartConfigurable.openDartSettings(project));
  }
}
 
Example #12
Source File: BazelTestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Reports an error in the run config that the user should correct.
 * <p>
 * This will be called while the user is typing into a non-template run config.
 * (See RunConfiguration.checkConfiguration.)
 *
 * @throws RuntimeConfigurationError for an error that that the user must correct before running.
 */
void checkRunnable(@NotNull final Project project) throws RuntimeConfigurationError {
  // The UI only shows one error message at a time.
  // The order we do the checks here determines priority.

  final DartSdk sdk = DartPlugin.getDartSdk(project);
  if (sdk == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"),
                                        () -> DartConfigurable.openDartSettings(project));
  }

  getScope(project).checkRunnable(this, project);
}
 
Example #13
Source File: BazelFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Reports an error in the run config that the user should correct.
 * <p>
 * This will be called while the user is typing into a non-template run config.
 * (See RunConfiguration.checkConfiguration.)
 *
 * @throws RuntimeConfigurationError for an error that that the user must correct before running.
 */
void checkRunnable(@NotNull final Project project) throws RuntimeConfigurationError {

  // The UI only shows one error message at a time.
  // The order we do the checks here determines priority.

  final DartSdk sdk = DartPlugin.getDartSdk(project);
  if (sdk == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"),
                                        () -> DartConfigurable.openDartSettings(project));
  }

  final String launchScript = getLaunchScriptFromWorkspace(project);
  if (launchScript == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.noLaunchingScript"));
  }

  final VirtualFile scriptFile = LocalFileSystem.getInstance().findFileByPath(launchScript);
  if (scriptFile == null) {
    throw new RuntimeConfigurationError(
      FlutterBundle.message("flutter.run.bazel.launchingScriptNotFound", FileUtil.toSystemDependentName(launchScript)));
  }

  // check that bazel target is not empty
  if (StringUtil.isEmptyOrSpaces(bazelTarget)) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.noTargetSet"));
  }
  // check that the bazel target starts with "//"
  else if (!bazelTarget.startsWith("//")) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.startWithSlashSlash"));
  }
}
 
Example #14
Source File: TestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull TestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  final MainFile.Result main = MainFile.verify(fields.testFile, project);
  if (!main.canLaunch()) {
    throw new RuntimeConfigurationError(main.getError());
  }
  final PubRoot root = PubRoot.forDirectory(main.get().getAppDir());
  if (root == null) {
    throw new RuntimeConfigurationError("Test file isn't within a Flutter pub root");
  }
}
 
Example #15
Source File: SdkAttachConfig.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void checkRunnable(@NotNull Project project) throws RuntimeConfigurationError {
  final DartSdk sdk = DartPlugin.getDartSdk(project);
  if (sdk == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"),
                                        () -> DartConfigurable.openDartSettings(project));
  }
  final MainFile.Result main = MainFile.verify(getFields().getFilePath(), project);
  if (!main.canLaunch()) {
    throw new RuntimeConfigurationError(main.getError());
  }
  if (PubRoot.forDirectory(main.get().getAppDir()) == null) {
    throw new RuntimeConfigurationError("Entrypoint isn't within a Flutter pub root");
  }
}
 
Example #16
Source File: BlazeAndroidRunConfigurationValidationUtil.java    From intellij with Apache License 2.0 5 votes vote down vote up
/**
 * Finds the top error, as determined by {@link ValidationError#compareTo(Object)}. If it is
 * fatal, it is thrown as a {@link RuntimeConfigurationError}; otherwise it is thrown as a {@link
 * RuntimeConfigurationWarning}. If no errors exist, nothing is thrown.
 */
public static void throwTopConfigurationError(List<ValidationError> errors)
    throws RuntimeConfigurationException {
  if (errors.isEmpty()) {
    return;
  }
  // TODO: Do something with the extra error information? Error count?
  ValidationError topError = Ordering.natural().max(errors);
  if (topError.isFatal()) {
    throw new RuntimeConfigurationError(topError.getMessage(), topError.getQuickfix());
  }
  throw new RuntimeConfigurationWarning(topError.getMessage(), topError.getQuickfix());
}
 
Example #17
Source File: BlazeCommandRunConfigurationCommonState.java    From intellij with Apache License 2.0 5 votes vote down vote up
public void validate(BuildSystem buildSystem) throws RuntimeConfigurationException {
  if (getCommandState().getCommand() == null) {
    throw new RuntimeConfigurationError("You must specify a command.");
  }
  String blazeBinaryString = getBlazeBinaryState().getBlazeBinary();
  if (blazeBinaryString != null && !(new File(blazeBinaryString).exists())) {
    throw new RuntimeConfigurationError(buildSystem.getName() + " binary does not exist");
  }
}
 
Example #18
Source File: TestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull TestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  final FlutterSdk sdk = FlutterSdk.getFlutterSdk(project);
  if (sdk != null && !sdk.getVersion().flutterTestSupportsFiltering()) {
    throw new RuntimeConfigurationError("Flutter SDK is too old to filter tests by name");
  }
  FILE.checkRunnable(fields, project);
}
 
Example #19
Source File: TestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull TestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  final VirtualFile dir = fields.getFileOrDir();
  if (dir == null) {
    throw new RuntimeConfigurationError("Directory not found");
  }
  final PubRoot root = PubRoot.forDescendant(dir, project);
  if (root == null) {
    throw new RuntimeConfigurationError("Directory is not in a pub root");
  }
}
 
Example #20
Source File: BazelFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Reports an error in the run config that the user should correct.
 * <p>
 * This will be called while the user is typing into a non-template run config.
 * (See RunConfiguration.checkConfiguration.)
 *
 * @throws RuntimeConfigurationError for an error that that the user must correct before running.
 */
void checkRunnable(@NotNull final Project project) throws RuntimeConfigurationError {

  // The UI only shows one error message at a time.
  // The order we do the checks here determines priority.

  final DartSdk sdk = DartPlugin.getDartSdk(project);
  if (sdk == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"),
                                        () -> DartConfigurable.openDartSettings(project));
  }

  final String launchScript = getLaunchScriptFromWorkspace(project);
  if (launchScript == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.noLaunchingScript"));
  }

  final VirtualFile scriptFile = LocalFileSystem.getInstance().findFileByPath(launchScript);
  if (scriptFile == null) {
    throw new RuntimeConfigurationError(
      FlutterBundle.message("flutter.run.bazel.launchingScriptNotFound", FileUtil.toSystemDependentName(launchScript)));
  }

  // check that bazel target is not empty
  if (StringUtil.isEmptyOrSpaces(bazelTarget)) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.noTargetSet"));
  }
  // check that the bazel target starts with "//"
  else if (!bazelTarget.startsWith("//")) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.startWithSlashSlash"));
  }
}
 
Example #21
Source File: BazelTestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Reports an error in the run config that the user should correct.
 * <p>
 * This will be called while the user is typing into a non-template run config.
 * (See RunConfiguration.checkConfiguration.)
 *
 * @throws RuntimeConfigurationError for an error that that the user must correct before running.
 */
void checkRunnable(@NotNull final Project project) throws RuntimeConfigurationError {
  // The UI only shows one error message at a time.
  // The order we do the checks here determines priority.

  final DartSdk sdk = DartPlugin.getDartSdk(project);
  if (sdk == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"),
                                        () -> DartConfigurable.openDartSettings(project));
  }

  getScope(project).checkRunnable(this, project);
}
 
Example #22
Source File: BazelTestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull BazelTestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  // The new bazel test runner could not be found.
  final Workspace workspace = fields.getWorkspace(project);
  if (workspace == null || workspace.getTestScript() == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.newBazelTestRunnerUnavailable"),
                                        () -> FlutterSettingsConfigurable.openFlutterSettings(project));
  }

  fields.verifyMainFile(project);
}
 
Example #23
Source File: BazelTestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull BazelTestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  // check that bazel target is not empty
  if (StringUtil.isEmptyOrSpaces(fields.getBazelTarget())) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.noTargetSet"));
  }
  // check that the bazel target starts with "//"
  if (!fields.getBazelTarget().startsWith("//")) {
    throw new RuntimeConfigurationError(FlutterBundle.message("flutter.run.bazel.startWithSlashSlash"));
  }
}
 
Example #24
Source File: ContextItemValidator.java    From intellij-xquery with Apache License 2.0 5 votes vote down vote up
public void validate(boolean contextItemEnabled, String contextItemType,
                     boolean contextItemFromEditorEnabled,
                     String contextItemText, String contextItemFile) throws RuntimeConfigurationError {
    if (contextItemEnabled) {
        if (isEmpty(contextItemType))
            throw new RuntimeConfigurationError(CONTEXT_ITEM_TYPE_MISSING_MESSAGE);
        if (!contextItemFromEditorEnabled && isEmpty(contextItemFile)) {
            throw new RuntimeConfigurationError(CONTEXT_ITEM_FILE_MISSING_MESSAGE);
        }
    }

}
 
Example #25
Source File: SdkFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Reports any errors that the user should correct.
 * <p>This will be called while the user is typing; see RunConfiguration.checkConfiguration.
 *
 * @throws RuntimeConfigurationError for an error that that the user must correct before running.
 */
void checkRunnable(@NotNull Project project) throws RuntimeConfigurationError {
  // TODO(pq): consider validating additional args values
  checkSdk(project);
  final MainFile.Result main = MainFile.verify(filePath, project);
  if (!main.canLaunch()) {
    throw new RuntimeConfigurationError(main.getError());
  }
  if (PubRootCache.getInstance(project).getRoot(main.get().getAppDir()) == null) {
    throw new RuntimeConfigurationError("Entrypoint isn't within a Flutter pub root");
  }
}
 
Example #26
Source File: SdkFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private static void checkSdk(@NotNull Project project) throws RuntimeConfigurationError {
  // TODO(skybrian) shouldn't this be flutter SDK?

  final DartSdk sdk = DartPlugin.getDartSdk(project);
  if (sdk == null) {
    throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"),
                                        () -> DartConfigurable.openDartSettings(project));
  }
}
 
Example #27
Source File: TestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull TestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  final FlutterSdk sdk = FlutterSdk.getFlutterSdk(project);
  if (sdk != null && !sdk.getVersion().flutterTestSupportsFiltering()) {
    throw new RuntimeConfigurationError("Flutter SDK is too old to filter tests by name");
  }
  FILE.checkRunnable(fields, project);
}
 
Example #28
Source File: TestFields.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void checkRunnable(@NotNull TestFields fields, @NotNull Project project) throws RuntimeConfigurationError {
  final MainFile.Result main = MainFile.verify(fields.testFile, project);
  if (!main.canLaunch()) {
    throw new RuntimeConfigurationError(main.getError());
  }
  final PubRoot root = PubRoot.forDirectory(main.get().getAppDir());
  if (root == null) {
    throw new RuntimeConfigurationError("Test file isn't within a Flutter pub root");
  }
}
 
Example #29
Source File: LaunchCommandsTest.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
void checkRunnable(@NotNull Project project) throws RuntimeConfigurationError {
  // Skip the Dart VM check in test code.
  getScope(project).checkRunnable(this, project);
}
 
Example #30
Source File: DataSourceValidator.java    From intellij-xquery with Apache License 2.0 4 votes vote down vote up
public void validate(String dataSourceName) throws RuntimeConfigurationError {
    if (dataSourceName == null) {
        throw new RuntimeConfigurationError(DATA_SOURCE_MISSING_MESSAGE);
    }
}