Specify raised exceptions
This commit is contained in:
parent
186f057b2b
commit
e1639974e3
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ class BuildFile(Validateable):
|
||||||
)
|
)
|
||||||
version_str = version_string.group()
|
version_str = version_string.group()
|
||||||
except:
|
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 = Version.from_str(version_str, self.get_default_suffix())
|
||||||
result.throw_if_invalid()
|
result.throw_if_invalid()
|
||||||
|
@ -115,7 +115,7 @@ class BuildFile(Validateable):
|
||||||
)
|
)
|
||||||
self.content = substitute
|
self.content = substitute
|
||||||
except:
|
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:
|
def get_default_suffix(self) -> str:
|
||||||
result = "SNAPSHOT"
|
result = "SNAPSHOT"
|
||||||
|
|
Loading…
Reference in a new issue