ploigos-step-runner icon indicating copy to clipboard operation
ploigos-step-runner copied to clipboard

Replace 'assert' with 'raise' for Maven logic

Open christophermay07 opened this issue 3 years ago • 0 comments

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}'
    )

christophermay07 avatar Oct 20 '21 14:10 christophermay07