Just made lispreader to send an error message to stderr when the file could not be...
authorRicardo Cruz <rick2@aeiou.pt>
Sun, 25 Apr 2004 10:02:14 +0000 (10:02 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Sun, 25 Apr 2004 10:02:14 +0000 (10:02 +0000)
SVN-Revision: 690

src/lispreader.cpp

index 0ece43d..4dc6d4f 100644 (file)
@@ -21,6 +21,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include <iostream>
 #include <string>
 #include <assert.h>
 #include <ctype.h>
@@ -1338,8 +1339,11 @@ lisp_object_t* lisp_read_from_file(const std::string& filename)
         {
           lisp_stream_init_file(&stream, in);
           obj = lisp_read(&stream);
-          fclose(in);
         }
+      else
+        std::cerr << "LispReader: File not found: " << filename << endl;
+
+      fclose(in);
 
       return obj;
     }