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'."
This commit is contained in:
parent
9ca6f78b07
commit
04715f74e2
6 changed files with 29 additions and 2 deletions
7
Examples/test-suite/errors/pp_unknowndirective.i
Normal file
7
Examples/test-suite/errors/pp_unknowndirective.i
Normal file
|
|
@ -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;
|
||||
1
Examples/test-suite/errors/pp_unknowndirective.stderr
Normal file
1
Examples/test-suite/errors/pp_unknowndirective.stderr
Normal file
|
|
@ -0,0 +1 @@
|
|||
c_unknowndirective.i:7: Error: Unknown directive '%remane'.
|
||||
Loading…
Add table
Add a link
Reference in a new issue