From 04715f74e2d27f0a956ae83232444e9fbc273ba4 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Thu, 8 Jan 2015 12:07:54 +1300 Subject: 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'." --- Examples/test-suite/errors/pp_unknowndirective.i | 7 +++++++ Examples/test-suite/errors/pp_unknowndirective.stderr | 1 + 2 files changed, 8 insertions(+) create mode 100644 Examples/test-suite/errors/pp_unknowndirective.i create mode 100644 Examples/test-suite/errors/pp_unknowndirective.stderr (limited to 'Examples') 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'. -- cgit v1.2.1