showNotification(StringUtil.notNullize(e.getMessage(), "Unknown error, see logs for details"), NotificationType.ERROR);
showNotification(StringUtil.notNullize(e.getMessage(), "Unknown error, see logs for details"), NotificationType.ERROR);
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..."); } }
SymfonyInstallerCommandExecutor.this.onError(e.getMessage()); return;
@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; }
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(); }
private static void runBuildProcess(@NotNull CompileContext context, @NotNull GeneralCommandLine commandLine, @NotNull String path) throws ProjectBuildException { try { LOG.debug(commandLine.getCommandLineString()); final Process process = commandLine.createProcess(); BaseOSProcessHandler handler = new BaseOSProcessHandler(process, commandLine.getCommandLineString(), Charset.defaultCharset()); handler.addProcessListener(new ProcessAdapter() { @Override public void onTextAvailable(ProcessEvent event, Key outputType) { final String text = event.getText(); if (!StringUtil.isEmptyOrSpaces(text)) { CompilerMessage compilerMessage = compilerMessageFromOutputLine(text.trim()); context.processMessage(compilerMessage); } } }); handler.startNotify(); handler.waitFor(); } catch (ExecutionException e) { throw new ProjectBuildException(e.getMessage()); } }
@NotNull @Override protected ProcessHandler startProcess() throws ExecutionException { try { final GeneralCommandLine dubCommandLine = getExecutableCommandLine(config); return new OSProcessHandler(dubCommandLine.createProcess(), dubCommandLine.getCommandLineString()); } catch (final ExecutionException e) { final String message = e.getMessage(); final Project project = config.getProject(); final boolean isEmpty = message.equals("DUB executable is not specified"); final boolean notCorrect = message.startsWith("Cannot run program"); if (isEmpty || notCorrect) { Notifications.Bus.notify( new Notification("DUB run configuration", "DUB settings", "DUB executable is " + (isEmpty ? "not specified" : "not specified correctly") + "<br/><a href='configureDLanguageTools'>Configure</a> executable", NotificationType.ERROR, new DToolsNotificationListener(project)), project); } throw e; } }
@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; } }
} catch (final ExecutionException e) { LOG.info("Failed executing " + command); LOG.info("Message: " + e.getMessage()); return null;
@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; } }
e.getMessage(), NotificationType.ERROR );
getGroup(), PerlBundle.message("perl.action.perl.tidy.running.error.title"), e.getMessage(), NotificationType.ERROR ));
showError(project, e.getMessage());
PERL_DEPARSE_GROUP, PerlBundle.message("perl.execution.error.notification.title"), e.getMessage().replaceAll("\\n", "<br/>"), NotificationType.ERROR ));
public static void runInConsole(@NotNull PerlCommandLine perlCommandLine) { ApplicationManager.getApplication().assertIsDispatchThread(); Executor runExecutor = DefaultRunExecutor.getRunExecutorInstance(); Project project = perlCommandLine.getNonNullEffectiveProject(); PerlRunConsole consoleView = new PerlRunConsole(project, perlCommandLine.getEffectiveHostData()); ProcessHandler processHandler = null; try { processHandler = PerlHostData.createConsoleProcessHandler(perlCommandLine); } catch (ExecutionException e) { consoleView.print(e.getMessage(), ConsoleViewContentType.ERROR_OUTPUT); LOG.warn(e); } RunContentDescriptor runContentDescriptor = new RunContentDescriptor( consoleView, processHandler, consoleView.buildPanel(), ObjectUtils.notNull(perlCommandLine.getConsoleTitle(), perlCommandLine.getCommandLineString()), ObjectUtils.notNull(perlCommandLine.getConsoleIcon(), PerlIcons.PERL_LANGUAGE_ICON) ); ExecutionManager.getInstance(project).getContentManager().showRunContent(runExecutor, runContentDescriptor); if (processHandler != null) { consoleView.attachToProcess(processHandler); processHandler.startNotify(); } consoleView.addCloseAction(runExecutor, runContentDescriptor); }