summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-01-06 15:02:15 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-01-06 15:02:15 +0200
commit6fa314a0b0819d630155d1adeff3daff53ab46dd (patch)
treec0785046a28ec6b01fe6bc8e143c405501c09027
parent6c97d8d94d603a07116224e29e5ab05f960f8de9 (diff)
downloadmeson-fix2882.tar.gz
Print problem text in error message. Closes #2882.fix2882
-rw-r--r--mesonbuild/backend/ninjabackend.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 1057892c6..85ed23281 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -42,8 +42,12 @@ def ninja_quote(text):
for char in ('$', ' ', ':'):
text = text.replace(char, '$' + char)
if '\n' in text:
- raise MesonException('Ninja does not support newlines in rules. '
- 'Please report this error with a test case to the Meson bug tracker.')
+ errmsg = '''Ninja does not support newlines in rules. The content was:
+
+%s
+
+Please report this error with a test case to the Meson bug tracker.''' % text
+ raise MesonException(errmsg)
return text