incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r791771 - /sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/jdt/CompilationUnit.java
Date Tue, 07 Jul 2009 09:51:38 GMT
Author: cziegeler
Date: Tue Jul  7 09:51:38 2009
New Revision: 791771

URL: http://svn.apache.org/viewvc?rev=791771&view=rev
Log:
Do not silently swallow exception

Modified:
    sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/jdt/CompilationUnit.java

Modified: sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/jdt/CompilationUnit.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/jdt/CompilationUnit.java?rev=791771&r1=791770&r2=791771&view=diff
==============================================================================
--- sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/jdt/CompilationUnit.java
(original)
+++ sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/jdt/CompilationUnit.java
Tue Jul  7 09:51:38 2009
@@ -265,12 +265,14 @@
                 }
             }
         } catch (IOException exc) {
-            exc.printStackTrace();
+            handleError(-1, -1, exc.getLocalizedMessage());
         }
     }
 
     private void handleError(int line, int column, Object errorMessage) {
-        if (column < 0) column = 0;
+        if (column < 0) {
+            column = 0;
+        }
         errors.add(new CompilerError(this.sourceFile,
                                      true,
                                      line,



Mime
View raw message