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

Replace 'assert' with 'raise' for Maven logic #232

Open
christophermay07 opened this issue Oct 20, 2021 · 0 comments
Open

Replace 'assert' with 'raise' for Maven logic #232

christophermay07 opened this issue Oct 20, 2021 · 0 comments

Comments

@christophermay07
Copy link
Contributor

For consistency, as well as the ability to control the Exception thrown which validations fail within our logic, replace 'assert' statements with 'raise' statements, e.g.,

assert os.path.exists(pom_file_path), \
    f'Given maven pom file (pom-file) does not exist: {pom_file_path}'

becomes

if not os.path.exists(pom_file_path):
    raise StepRunnerException(
        f'Given maven pom file (pom-file) does not exist: {pom_file_path}'
    )
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

No branches or pull requests

1 participant