aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-07-28 20:45:38 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-07-28 20:45:38 +0300
commit4a92b78e6e4508afb8ca988cb47c91ea4a765fee (patch)
tree70de647f47c4030efa045b5a0cec65a75e04a3b5
parent9ff00de93bd0589cdb016793de51d6b14d0825f8 (diff)
downloadmeson-4a92b78e6e4508afb8ca988cb47c91ea4a765fee.zip
meson-4a92b78e6e4508afb8ca988cb47c91ea4a765fee.tar.gz
meson-4a92b78e6e4508afb8ca988cb47c91ea4a765fee.tar.bz2
A few error message fixes.
-rw-r--r--mesonbuild/interpreter.py2
-rw-r--r--mesonbuild/modules/windows.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 72eebe7..5201be2 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1704,6 +1704,8 @@ class Interpreter():
'for the dependency', mlog.bold(name))
raise
dep = self.subprojects[dirname].get_variable_method([varname], {})
+ if not isinstance(dep, (DependencyHolder, InternalDependencyHolder)):
+ raise InterpreterException('Fallback variable is not a dependency object.')
# Check if the version of the declared dependency matches what we want
if 'version' in kwargs:
wanted = kwargs['version']
diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py
index 7bf0319..cd4e343 100644
--- a/mesonbuild/modules/windows.py
+++ b/mesonbuild/modules/windows.py
@@ -38,6 +38,8 @@ class WindowsModule:
rescomp = dependencies.ExternalProgram(rescomp_name, silent=True)
res_args = extra_args + ['@INPUT@', '@OUTPUT@']
suffix = 'o'
+ if not rescomp.found():
+ raise MesonException('Could not find Windows resource compiler %s.' % ' '.join(rescomp.get_command()))
res_files = mesonlib.stringlistify(args)
res_kwargs = {'output' : '@BASENAME@.' + suffix,
'arguments': res_args}