changeset 20:fe2a094f4509

Fix warning messages.
author Mikhail Kryshen <mikhail@kryshen.net>
date Tue, 21 Apr 2009 20:49:53 +0400
parents 7b11f5174e29
children 8c6302226917 d3a8871e6e73
files src/kryshen/tema/FunctionDataParser.java src/kryshen/tema/functions/IO.java
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/kryshen/tema/FunctionDataParser.java	Tue Apr 21 19:21:16 2009 +0400
+++ b/src/kryshen/tema/FunctionDataParser.java	Tue Apr 21 20:49:53 2009 +0400
@@ -196,8 +196,8 @@
     }
 
     public void warning(String message) {
-        System.err.println(in.getSource() + ":" + in.getLineNumber() +
-                ": in " + name + ": " + message);
+        System.err.println(in.getSource() + ":" + (in.getLineNumber() + 1) +
+                ": " + name + ": " + message);
     }
 
     public File createFile(String path) {
--- a/src/kryshen/tema/functions/IO.java	Tue Apr 21 19:21:16 2009 +0400
+++ b/src/kryshen/tema/functions/IO.java	Tue Apr 21 20:49:53 2009 +0400
@@ -108,7 +108,8 @@
             try {
                 readFile(fdp.createFile(filename), out);
             } catch (IOException e) {
-                System.err.println(e);
+                fdp.warning(e.getMessage());
+                //System.err.println(e);
                 //throw new TemplateException(e.getMessage(), e, in);
                 return 0;
             }