Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance error messsages of ProcessBuilder #608

Closed
jan-vcapgemini opened this issue Sep 11, 2024 · 2 comments · Fixed by #653
Closed

Enhance error messsages of ProcessBuilder #608

jan-vcapgemini opened this issue Sep 11, 2024 · 2 comments · Fixed by #653
Assignees
Labels
enhancement New feature or request process executing external programs (ProcessContext)

Comments

@jan-vcapgemini
Copy link
Contributor

jan-vcapgemini commented Sep 11, 2024

As an IDEasy user, I want to see what exactly failed when an application was not run successfully.

Currently IDEasy only shows the exit code of a failed process and omits the error messages in the log.

See:

private void performLogOnError(ProcessResult result, int exitCode, String interpreter) {
if (!result.isSuccessful() && (this.errorHandling != ProcessErrorHandling.NONE)) {
String message = createCommandMessage(interpreter, " failed with exit code " + exitCode + "!");

We could easily add result.getErr() here too.

UPDATE (JH): This should depend on ProcessMode so e.g. for DEFAULT all output was already redirected to the shell. However, for DEFAULT_CAPTURE we should output what has been captured (IMHO both stdout and stderr).
Somehow this is a duplicate or at least strongly overlaps with #593.

@jan-vcapgemini jan-vcapgemini added the enhancement New feature or request label Sep 11, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Sep 11, 2024
@jan-vcapgemini jan-vcapgemini self-assigned this Sep 11, 2024
@jan-vcapgemini jan-vcapgemini moved this from 🆕 New to 🏗 In progress in IDEasy board Sep 11, 2024
@hohwille
Copy link
Member

What is the status here?
According to #593 most of this issue is already implemented.

@hohwille hohwille added the process executing external programs (ProcessContext) label Sep 23, 2024
@hohwille
Copy link
Member

IMHO #593 problem went away since output is not captured anymore.
But in case of capture this story still needs to be implemented.

jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Sep 25, 2024
added test for enhanced error messages
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Sep 25, 2024
added outs to error message
added check for DEFAULT_CAPTURE to start performLogOnError
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Sep 25, 2024
reformatted process out and error messages
added test with expected Exception and error messages
added test resources
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Sep 25, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 4, 2024
refactored eclipse log method into ProcessResult
added log method to ProcessResult
optimized performLogOnError to use logger with proper log levels instead of custom messages
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 4, 2024
made sure that context runs on windows to detect dotnet.cmd properly
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 4, 2024
moved dotnet.cmd to windows folder
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 7, 2024
moved windows test to parameterized tests
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 7, 2024
added missing javadocs
fixed dotnet windows test script
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 7, 2024
renamed dotnet.cmd to dotnet.exe
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 8, 2024
fixed DotNet test
added run test to NpmTest
removed unused test resource files
renamed readme files to .gitkeep
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 15, 2024
made dotnet.exe executable
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 15, 2024
adjusted DotnetTest
adjusted NpmTest
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 17, 2024
disabled dotnet run tests on CI
disabled npm run test
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 21, 2024
removed SubLogger
moved throw of exceptions after logger
optimized out and err creation
removed level checks for logger
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 21, 2024
re-added logging of exitcode on proper log level
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 24, 2024
removed duplicated log messages
removed ProcessResult.run hack
fixed and cleaned up tests
renamed ProcessConttextUnderTest
added new log method with 2 log levels to ProcessResult
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 24, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 28, 2024
enforced log output of test scripts even if processMode was BACKGROUND
@hohwille hohwille added this to the release:2024.11.001 milestone Oct 29, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 30, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Oct 30, 2024
hohwille pushed a commit that referenced this issue Oct 31, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in IDEasy board Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request process executing external programs (ProcessContext)
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants