summaryrefslogtreecommitdiffstats
path: root/SCons/Tool/MSCommon
diff options
context:
space:
mode:
Diffstat (limited to 'SCons/Tool/MSCommon')
-rw-r--r--SCons/Tool/MSCommon/MSVC/Exceptions.py15
-rw-r--r--SCons/Tool/MSCommon/MSVC/Policy.py5
-rw-r--r--SCons/Tool/MSCommon/__init__.py1
-rw-r--r--SCons/Tool/MSCommon/vc.py5
4 files changed, 17 insertions, 9 deletions
diff --git a/SCons/Tool/MSCommon/MSVC/Exceptions.py b/SCons/Tool/MSCommon/MSVC/Exceptions.py
index a12b3c6..7b24a2b 100644
--- a/SCons/Tool/MSCommon/MSVC/Exceptions.py
+++ b/SCons/Tool/MSCommon/MSVC/Exceptions.py
@@ -25,27 +25,32 @@
Exceptions for Microsoft Visual C/C++.
"""
+# reminder: add exceptions to MSCommon if necessary
+
class VisualCException(Exception):
pass
class MSVCInternalError(VisualCException):
pass
+class MSVCUserError(VisualCException):
+ pass
+
class MSVCScriptExecutionError(VisualCException):
pass
-class MSVCVersionNotFound(VisualCException):
+class MSVCVersionNotFound(MSVCUserError):
pass
-class MSVCSDKVersionNotFound(VisualCException):
+class MSVCSDKVersionNotFound(MSVCUserError):
pass
-class MSVCToolsetVersionNotFound(VisualCException):
+class MSVCToolsetVersionNotFound(MSVCUserError):
pass
-class MSVCSpectreLibsNotFound(VisualCException):
+class MSVCSpectreLibsNotFound(MSVCUserError):
pass
-class MSVCArgumentError(VisualCException):
+class MSVCArgumentError(MSVCUserError):
pass
diff --git a/SCons/Tool/MSCommon/MSVC/Policy.py b/SCons/Tool/MSCommon/MSVC/Policy.py
index 9b7025e..fe8da31 100644
--- a/SCons/Tool/MSCommon/MSVC/Policy.py
+++ b/SCons/Tool/MSCommon/MSVC/Policy.py
@@ -45,6 +45,7 @@ from ..common import (
)
from .Exceptions import (
+ MSVCArgumentError,
MSVCVersionNotFound,
MSVCScriptExecutionError,
)
@@ -141,7 +142,7 @@ def _msvc_notfound_policy_lookup(symbol):
repr(symbol),
', '.join([repr(s) for s in MSVC_NOTFOUND_POLICY_EXTERNAL.keys()])
)
- raise ValueError(err_msg)
+ raise MSVCArgumentError(err_msg)
return notfound_policy_def
@@ -225,7 +226,7 @@ def _msvc_scripterror_policy_lookup(symbol):
repr(symbol),
', '.join([repr(s) for s in MSVC_SCRIPTERROR_POLICY_EXTERNAL.keys()])
)
- raise ValueError(err_msg)
+ raise MSVCArgumentError(err_msg)
return scripterror_policy_def
diff --git a/SCons/Tool/MSCommon/__init__.py b/SCons/Tool/MSCommon/__init__.py
index 8396e17..0640bce 100644
--- a/SCons/Tool/MSCommon/__init__.py
+++ b/SCons/Tool/MSCommon/__init__.py
@@ -58,6 +58,7 @@ from .MSVC.Policy import msvc_get_scripterror_policy # noqa: F401
from .MSVC.Exceptions import VisualCException # noqa: F401
from .MSVC.Exceptions import MSVCInternalError # noqa: F401
+from .MSVC.Exceptions import MSVCUserError # noqa: F401
from .MSVC.Exceptions import MSVCScriptExecutionError # noqa: F401
from .MSVC.Exceptions import MSVCVersionNotFound # noqa: F401
from .MSVC.Exceptions import MSVCSDKVersionNotFound # noqa: F401
diff --git a/SCons/Tool/MSCommon/vc.py b/SCons/Tool/MSCommon/vc.py
index 68b8f08..27a254b 100644
--- a/SCons/Tool/MSCommon/vc.py
+++ b/SCons/Tool/MSCommon/vc.py
@@ -64,6 +64,7 @@ from . import MSVC
from .MSVC.Exceptions import (
VisualCException,
+ MSVCUserError,
MSVCArgumentError,
MSVCToolsetVersionNotFound,
)
@@ -86,10 +87,10 @@ class NoVersionFound(VisualCException):
class BatchFileExecutionError(VisualCException):
pass
-class MSVCScriptNotFound(VisualCException):
+class MSVCScriptNotFound(MSVCUserError):
pass
-class MSVCUseSettingsError(VisualCException):
+class MSVCUseSettingsError(MSVCUserError):
pass