diff options
author | Olly Betts <olly@survex.com> | 2015-01-08 12:07:54 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2015-01-08 12:07:54 +1300 |
commit | 04715f74e2d27f0a956ae83232444e9fbc273ba4 (patch) | |
tree | 4ab0fbfb55633e92ca09eb376ed40d33e18745c9 /Examples | |
parent | 9ca6f78b078887ee9357ad63e68ed79e214a40f3 (diff) | |
download | swig-04715f74e2d27f0a956ae83232444e9fbc273ba4.tar.gz |
Improve error message when an unknown SWIG directive is used
This previously gave the cryptic "Error: Syntax error in input(1).", but
now gives "Error: Unknown directive '%foo'."
Diffstat (limited to 'Examples')
-rw-r--r-- | Examples/test-suite/errors/pp_unknowndirective.i | 7 | ||||
-rw-r--r-- | Examples/test-suite/errors/pp_unknowndirective.stderr | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Examples/test-suite/errors/pp_unknowndirective.i b/Examples/test-suite/errors/pp_unknowndirective.i new file mode 100644 index 000000000..659a997d3 --- /dev/null +++ b/Examples/test-suite/errors/pp_unknowndirective.i @@ -0,0 +1,7 @@ +%module xxx + +/* This used to give the rather cryptic "Syntax error in input(1)." prior to + * SWIG 3.0.4. This testcase checks that the improved message is actually + * issued. + */ +%remane("typo") tyop; diff --git a/Examples/test-suite/errors/pp_unknowndirective.stderr b/Examples/test-suite/errors/pp_unknowndirective.stderr new file mode 100644 index 000000000..4506c5cf4 --- /dev/null +++ b/Examples/test-suite/errors/pp_unknowndirective.stderr @@ -0,0 +1 @@ +c_unknowndirective.i:7: Error: Unknown directive '%remane'. |