Skip to content

Release 2.5

Compare
Choose a tag to compare
@fleipold fleipold released this 21 Feb 13:21
· 32 commits to master since this release

Rework Exception Message

Now we also include STDOUT into the ExcptionMessage when a process terminates
with an unexpected status code.

This helps with programs that return error messages on STDOUT rather than
STDERR.

To make the output clearer, the overall format of the message was reworked:

  • It now includes the full commandline string prefixed with a $-sign.
  • The lines after the first line are indented to make clear that they belong to the exception.
  • If present and available standard out and standard error are included and prefixed with
    "STDOUT:" and "STDERR:" respectively.

Here is an example invoking git commit with no staged changes:

Exception in thread "main" org.buildobjects.process.ExternalProcessFailureException: External process `git` terminated with unexpected exit status 1 after 39ms:
  $ git commit -m '1st commit'
  STDOUT: On branch master
  STDOUT:
  STDOUT: Initial commit
  STDOUT:
  STDOUT: nothing to commit (create/copy files and use "git add" to track)

Renamed ProcString to CommandLine

The command line representation of the invocation has previously been
called procString. It was now renamed to commandLine and the old
methods have been deprecated.