summaryrefslogtreecommitdiffstats
path: root/SCons/Tool/MSCommon/MSVC
diff options
context:
space:
mode:
authorJoseph Brill <48932340+jcbrill@users.noreply.github.com>2022-07-07 17:41:07 (GMT)
committerJoseph Brill <48932340+jcbrill@users.noreply.github.com>2022-07-07 17:41:07 (GMT)
commit88c534e242abcb17c721ceffd976397cf8d4c097 (patch)
treedd8df88e5cbb83aecb21b65d44e793ba8db9085a /SCons/Tool/MSCommon/MSVC
parente8faf157450ec575d743108624645bb8207c4a00 (diff)
downloadSCons-88c534e242abcb17c721ceffd976397cf8d4c097.zip
SCons-88c534e242abcb17c721ceffd976397cf8d4c097.tar.gz
SCons-88c534e242abcb17c721ceffd976397cf8d4c097.tar.bz2
Minor update to msvc exceptions and rework new unit tests.
Diffstat (limited to 'SCons/Tool/MSCommon/MSVC')
-rw-r--r--SCons/Tool/MSCommon/MSVC/Exceptions.py15
-rw-r--r--SCons/Tool/MSCommon/MSVC/Policy.py5
2 files changed, 13 insertions, 7 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