From e1639974e3d3504c4c6df32dd0bd903e06304755 Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 12 Jul 2023 14:37:07 +0200 Subject: [PATCH] Specify raised exceptions --- src/main/python/ddadevops/domain/build_file.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/python/ddadevops/domain/build_file.py b/src/main/python/ddadevops/domain/build_file.py index 350a4a9..07711cd 100644 --- a/src/main/python/ddadevops/domain/build_file.py +++ b/src/main/python/ddadevops/domain/build_file.py @@ -76,7 +76,7 @@ class BuildFile(Validateable): ) version_str = version_string.group() except: - raise Exception(f"Version not found in file {self.file_path}") + raise RuntimeError(f"Version not found in file {self.file_path}") result = Version.from_str(version_str, self.get_default_suffix()) result.throw_if_invalid() @@ -115,7 +115,7 @@ class BuildFile(Validateable): ) self.content = substitute except: - raise Exception(f"Version not found in file {self.file_path}") + raise RuntimeError(f"Version not found in file {self.file_path}") def get_default_suffix(self) -> str: result = "SNAPSHOT"