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

Improve exception reporting #44

Merged

Conversation

olivergondza
Copy link
Member

No description provided.

@@ -801,15 +802,15 @@ private void cleanupConnection(TaskListener listener) {
* return javaPath if specified in the configuration.
* Finds local Java, and if none exist, install one.
*/
protected String resolveJava(SlaveComputer computer, TaskListener listener) throws InterruptedException, IOException2 {
protected String resolveJava(SlaveComputer computer, TaskListener listener) throws InterruptedException, IOException {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never used in public plugins.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I see no usages in private-source plugins, to which I have access.
But maybe you want to create a new method and use the original one as a wrapper. NIT anyway

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not seem to be worth the hassle. Only clients impacted are those that handle IOException2 and IOException differently - which does not really makes sense. Fortunately, this will break source compatibility pointing them to the problem.

} catch (IOException e) {
try {
// often times error this early means the JVM has died, so let's see if we can capture all stderr
// and exit code
throw new IOException2(getSessionOutcomeMessage(session,false),e);
throw new AbortException(getSessionOutcomeMessage(session,false));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no reason to obscure the the friendly cause message with irrelevant stacktrace.

@olivergondza olivergondza merged commit e97b0ab into jenkinsci:master Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants