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

Clean up exception handling #225

Merged
merged 6 commits into from
Jun 6, 2020
Merged

Clean up exception handling #225

merged 6 commits into from
Jun 6, 2020

Conversation

basil
Copy link
Member

@basil basil commented Jun 6, 2020

Various changes to clean up exception handling:

  • Stop printing a warning about a missing -master argument when invoking the client with -help
  • Print a more friendly message when an invalid command-line argument is specified.
  • Catch more specific exceptions where possible.
  • Use multi-catch where possible.
  • Avoid both logging and re-throwing exceptions. Simpler and more readable to just re-throw and log once from the catch block.
  • Consistently throw RetryException from any failures in SwarmClient.
  • Always set the cause of the exception whenever rethrowing.
  • Remove redundant throws exceptions

@basil basil added the internal Internal changes label Jun 6, 2020
@basil basil closed this Jun 6, 2020
@basil basil reopened this Jun 6, 2020
@basil basil closed this Jun 6, 2020
@basil basil reopened this Jun 6, 2020
@basil basil merged commit c189b56 into jenkinsci:master Jun 6, 2020
@basil basil deleted the exceptions branch June 12, 2020 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Internal changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant