Skip to content

Refactor Groovy version detection to use custom exception - #373

Draft
keeganwitt wants to merge 1 commit into
groovy:masterfrom
keeganwitt:refactor-groovy-version-exception-5377686203626255468
Draft

Refactor Groovy version detection to use custom exception#373
keeganwitt wants to merge 1 commit into
groovy:masterfrom
keeganwitt:refactor-groovy-version-exception-5377686203626255468

Conversation

@keeganwitt

Copy link
Copy Markdown
Member

Replaced raw RuntimeException with GroovyVersionException in ClassWrangler. This improves maintainability and error handling by providing a more specific exception type and preserving the original cause.

Key changes:

  • Created GroovyVersionException (unchecked) in util package.
  • Updated ClassWrangler.getGroovyVersion() to throw GroovyVersionException.
  • Updated ClassWrangler.getGroovyJar() to throw GroovyVersionException.
  • Included the original cause in the new exception for better debuggability.

Replaced raw RuntimeException with GroovyVersionException in ClassWrangler.
This improves maintainability and error handling by providing a more
specific exception type and preserving the original cause.

Key changes:
- Created GroovyVersionException (unchecked) in util package.
- Updated ClassWrangler.getGroovyVersion() to throw GroovyVersionException.
- Updated ClassWrangler.getGroovyJar() to throw GroovyVersionException.
- Included the original cause in the new exception for better debuggability.

Co-authored-by: keeganwitt <64612+keeganwitt@users.noreply.github.com>
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.

1 participant