Updating exception class and message
@@ -7,10 +7,6 @@ from conans.util.env_reader import get_env
_global_output = None
-class SystemPackageToolInvalidMode(ConanException):
- pass
-
-
class SystemPackageTool(object):
def __init__(self, runner=None, os_info=None, tool=None, recommends=False):
@@ -36,9 +32,7 @@ class SystemPackageTool(object):
mode = get_env("CONAN_SYSREQUIRES_MODE", "enabled")
mode_lower = mode.lower()
if mode_lower not in allowed_modes:
- raise SystemPackageToolInvalidMode(
- "CONAN_SYSREQUIRES_MODE=%s is not allowed, allowed modes=%r" % (mode, allowed_modes)
- )
+ raise ConanException("CONAN_SYSREQUIRES_MODE=%s is not allowed, allowed modes=%r" % (mode, allowed_modes))
return mode_lower
@staticmethod
@@ -83,7 +77,7 @@ class SystemPackageTool(object):
if mode == "verify" and not self._installed(packages):
raise ConanException(
- "Aborted due to CONAN_SYSREQUIRES_MODE=%s and packages needs to be installed" % mode
+ "Aborted due to CONAN_SYSREQUIRES_MODE=%s. Some system packages need to be installed" % mode
)
if not force and self._installed(packages):
