You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by db...@apache.org on 2010/05/06 02:41:53 UTC
svn commit: r941554 -
/felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Closure.java
Author: dbaum
Date: Thu May 6 00:41:53 2010
New Revision: 941554
URL: http://svn.apache.org/viewvc?rev=941554&view=rev
Log:
fix setLocation to always map EOFError
Modified:
felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Closure.java
Modified: felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Closure.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Closure.java?rev=941554&r1=941553&r2=941554&view=diff
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Closure.java (original)
+++ felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Closure.java Thu May 6 00:41:53 2010
@@ -64,7 +64,7 @@ public class Closure extends Reflective
throw setLocation(e);
}
}
-
+
public CommandSessionImpl session()
{
return session;
@@ -81,13 +81,6 @@ public class Closure extends Reflective
{
SyntaxError se = (SyntaxError) e;
loc += se.line() + "." + se.column();
-
- if (e instanceof EOFError)
- { // map to public exception, so interactive clients can provide more input
- EOFException eofe = new EOFException(e.getMessage());
- eofe.initCause(e);
- e = eofe;
- }
}
else if (null != errTok)
{
@@ -102,6 +95,13 @@ public class Closure extends Reflective
}
session.put(LOCATION, location.get());
+
+ if (e instanceof EOFError)
+ { // map to public exception, so interactive clients can provide more input
+ EOFException eofe = new EOFException(e.getMessage());
+ eofe.initCause(e);
+ return eofe;
+ }
return e;
}