@NotNull @Override public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException { // Get the remote host address. String address = getRemoteAddress(env); if (address == null || address.isEmpty()) { throw new ExecutionException("Invalid remote address."); } // Create a new connector. This will be used to communicate with the debugger. BallerinaWebSocketConnector ballerinaDebugSession = new BallerinaWebSocketConnector(address); return new BallerinaDebugProcess(session, ballerinaDebugSession, null); } }).getRunContentDescriptor();
showNotification(StringUtil.notNullize(e.getMessage(), "Unknown error, see logs for details"), NotificationType.ERROR);
@NotNull @Override public ProcessHandler startProcess() throws ExecutionException { try { final GeneralCommandLine appCommandLine = getExecutableCommandLine(config); return new OSProcessHandler(appCommandLine.createProcess(), appCommandLine.getCommandLineString()); } catch (final NoValidDlangSdkFound e) { throw new ExecutionException("No valid DMD SDK found!"); } catch (final ModuleNotFoundException e) { throw new ExecutionException("Run configuration has no module selected."); } catch (final ExecutionException e) { final String message = e.getMessage(); final boolean isEmpty = message.equals("Executable is not specified"); final boolean notCorrect = message.startsWith("Cannot run program"); if (isEmpty || notCorrect) { Notifications.Bus.notify( new Notification("D App run configuration", "D App settings", "D application executable path is " + (isEmpty ? "empty" : "not specified correctly") + "<br/><a href='configure'>Configure</a> output folder", NotificationType.ERROR), config.getProject()); } throw e; } }
@Override public void onRunException(final ExecutionException e) { e.printStackTrace(); } });
Messages.showErrorDialog(project, "Unable to run JFlex"+ "\n" + ex.getLocalizedMessage(), commandName); return ActionCallback.REJECTED;
@NotNull @Override protected ProcessHandler startProcess() throws ExecutionException { try { final GeneralCommandLine cmd = getDmdCommandLine(config); final OSProcessHandler handler = new OSProcessHandler(cmd.createProcess(), cmd.getCommandLineString()); handler.addProcessListener(this); return handler; } catch (final NoValidDlangSdkFound e) { throw new ExecutionException("No valid DMD SDK found!"); } catch (final NoSourcesException e) { throw new ExecutionException("No D Language source files found in directory: " + e.getSourcesRoot()); } catch (final ModuleNotFoundException e) { throw new ExecutionException("Run configuration has no module selected."); } catch (final ExecutionException e) { final String message = e.getMessage(); final boolean isEmpty = message.equals("Executable is not specified"); final boolean notCorrect = message.startsWith("Cannot run program"); if (isEmpty || notCorrect) { Notifications.Bus.notify( new Notification("DMD run configuration", "DMD settings", "DMD executable path is " + (isEmpty ? "empty" : "not specified correctly") + "<br/><a href='configure'>Configure</a>", NotificationType.ERROR), config.getProject()); } throw e; } }
@Override public void onRunException(final ExecutionException e) { e.printStackTrace(); // TODO ? } });
new LoginFailureMessage.SingleSignOnExecutionFailureEvent( serverConfig, loginSsoCmd, -1, "", e.getLocalizedMessage() )); return Status.FAIL;
throw new ExecutionException("Cannot create temporary output file", e); try { if (!outputFile.exists() && !outputFile.createNewFile()) { throw new ExecutionException("Cannot create output file " + outputFile.getAbsolutePath()); throw new ExecutionException("Cannot create output file " + outputFile.getAbsolutePath()); throw new ExecutionException("Cannot create output file in " + outputDirectory.getAbsolutePath()); throw new ExecutionException("Cannot make temporary file executable " + outputFile.getAbsolutePath());
showNotification(StringUtil.notNullize(e.getMessage(), "Unknown error, see logs for details"), NotificationType.ERROR);
private ExecutionResult getExecutionResults(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException { // Start debugger. ExecutionResult executionResult = state.execute(env.getExecutor(), new BallerinaDebugger()); if (executionResult == null) { throw new ExecutionException("Cannot run debugger"); } return executionResult; }
private void testPath() { try { testMongoPathFeedbackLabel.setIcon(null); if (MongoUtils.checkMongoShellPath(getShellPath())) { testMongoPathFeedbackLabel.setIcon(ServerConfigurationPanel.SUCCESS); } else { testMongoPathFeedbackLabel.setIcon(ServerConfigurationPanel.FAIL); } } catch (ExecutionException e) { Messages.showErrorDialog(mainPanel, e.getMessage(), "Error During Mongo Shell Path Checking..."); } }
ex.printStackTrace(); Notifications.Bus.notify(new Notification(NOTIFICATION_GROUPID, "Fixing " + psiFile.getName() + " with DFix failed.", ExceptionUtil.getUserStackTrace(ex, LOG),
@NotNull private RunningState createRunningState(ExecutionEnvironment env) throws ExecutionException { GoModuleBasedConfiguration configuration = getConfigurationModule(); Module module = configuration.getModule(); if (module == null) { throw new ExecutionException("Go isn't configured for run configuration: " + getName()); } return newRunningState(env, module); }
SymfonyInstallerCommandExecutor.this.onError(e.getMessage()); return;
@NotNull private RunningState createRunningState(ExecutionEnvironment env) throws ExecutionException { BallerinaModuleBasedConfiguration configuration = getConfigurationModule(); Module module = configuration.getModule(); if (module == null) { throw new ExecutionException("Ballerina isn't configured for run configuration: " + getName()); } return newRunningState(env, module); }
@Nullable protected ProcessOutput getProcessOutput(@NotNull PerlCommandLine commandLine) { try { return PerlHostData.execAndGetOutput(commandLine.withHostData(getHostData())); } catch (ExecutionException e) { LOG.warn("Error running " + commandLine, e); notifyUser(PerlBundle.message("perl.vm.adapter.notification.message.exception", e.getMessage())); } return null; }
throw new ExecutionException("Cannot run debugger");
private Optional<Integer> findSimulatorPort(int i) { for (int port = SIMULATOR_PORT_MIN; port < SIMULATOR_PORT_MAX; port++) { printToConsole("Attempt " + i + " to connect to simulator (port " + port + ")...\n", ConsoleViewContentType.NORMAL_OUTPUT); try { Process process = createShellCmd(port).createProcess(); if (hasProcessOutputLineContaining(process, SHELL_SUCCESS_CONNECTED_TO_SIMULATOR)) { return Optional.of(port); } } catch (ExecutionException e) { printToConsole(e.getMessage(), ConsoleViewContentType.ERROR_OUTPUT); } } return Optional.empty(); }