From d92f978e61f5b62dccd6ecf1a18e1c675af0cad3 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Wed, 19 Jan 2000 00:02:05 +0000 Subject: [PATCH] Added check for file not found. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@107 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/SWIG1.1/main.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/SWIG1.1/main.cxx b/Source/SWIG1.1/main.cxx index b2e914e6f..cebc5c37e 100644 --- a/Source/SWIG1.1/main.cxx +++ b/Source/SWIG1.1/main.cxx @@ -402,6 +402,10 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { FILE *f; int i; DOH *ds = Swig_include(input_file); + if (!ds) { + Printf(stderr,"Unable to find '%s'\n", input_file); + SWIG_exit(1); + } Seek(ds,0,SEEK_END); for (i = 0; i < Len(libfiles); i++) { Printf(ds,"\n%%include \"%s\"\n", Getitem(libfiles,i));