diff --git a/Examples/test-suite/errors/pp_unknowndirective2.stderr b/Examples/test-suite/errors/pp_unknowndirective2.stderr index 8244c7d0d..70afa670c 100644 --- a/Examples/test-suite/errors/pp_unknowndirective2.stderr +++ b/Examples/test-suite/errors/pp_unknowndirective2.stderr @@ -1 +1 @@ -pp_unknowndirective2.i:7: Error: Unknown SWIG preprocessor directive: elsif +pp_unknowndirective2.i:7: Error: Unknown SWIG preprocessor directive: elsif (if this is a block of target language code, delimit it with %{ and %}) diff --git a/Source/Preprocessor/cpp.c b/Source/Preprocessor/cpp.c index 8fd30f703..ac912f49e 100644 --- a/Source/Preprocessor/cpp.c +++ b/Source/Preprocessor/cpp.c @@ -1771,7 +1771,7 @@ String *Preprocessor_parse(String *s) { } else if (Equal(id, "")) { /* Null directive */ } else { - Swig_error(Getfile(s), Getline(id), "Unknown SWIG preprocessor directive: %s\n", id); + Swig_error(Getfile(s), Getline(id), "Unknown SWIG preprocessor directive: %s (if this is a block of target language code, delimit it with %%{ and %%})\n", id); } for (i = 0; i < cpp_lines; i++) Putc('\n', ns);