Skip to content

ecj spams the console with irrelevant zip exceptions#5189

Open
stephan-herrmann wants to merge 1 commit into
eclipse-jdt:masterfrom
stephan-herrmann:issue1578
Open

ecj spams the console with irrelevant zip exceptions#5189
stephan-herrmann wants to merge 1 commit into
eclipse-jdt:masterfrom
stephan-herrmann:issue1578

Conversation

@stephan-herrmann

Copy link
Copy Markdown
Contributor
  • improve error message
  • remove printing of stack traces
  • make err printout testable

Fixes #1578

+ improve error message
+ remove printing of stack traces
+ make err printout testable

Fixes eclipse-jdt#1578
@stephan-herrmann

Copy link
Copy Markdown
Contributor Author

Implements the following idea from #1578:

@jukzi:
do not log stacktrace for ZipException - only log filename

@iloveeclipse:
I would be fine with that, assuming we produce error messages distinct enough to identify the exact place in compiler code that produces it.

I removed printStackTrace() only in one location, and at the same time improved the error messages as to tell the user, how exactly (by which command line option) the offending file entered compilation.

In order to make this testable, I also redirect the printout via Main.err (since plain System.err.println() almost never is a good idea to begin with).

This comes with the risk, that some build tools will only now begin to "see" these messages, and ecj cannot know, how those tools will interpret this (perhaps this will cause them to mark a compilation as failed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ecj spams the console with irrelevant zip exceptions

1 participant