Tidy up exceptions to be more accurate.

This commit is contained in:
Mike Auty
2019-11-13 19:58:14 +00:00
committed by ikelos
parent 8532eef781
commit b99ace86fb
15 changed files with 41 additions and 34 deletions
@@ -153,9 +153,6 @@ def os_distinguisher(version_check: Callable[[Tuple[int, ...]], bool],
except (AttributeError, ValueError, TypeError):
vollog.log(constants.LOGLEVEL_VVV, "Windows PE version data is not available")
if not fallback_checks:
raise ValueError("No fallback methods for os_distinguishing provided")
# fall back to the backup method, if necessary
for name, member, response in fallback_checks:
if member is None:
@@ -52,7 +52,7 @@ class VerInfo(interfaces.plugins.PluginInterface):
"""
if layer_name is None:
raise ValueError("Layer must be a string not None")
raise TypeError("Layer must be a string not None")
pe_data = io.BytesIO()