Specify raised exceptions

This commit is contained in:
erik 2023-07-12 14:37:07 +02:00
parent 186f057b2b
commit e1639974e3

View file

@ -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"