langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java
changeset 37751 77e7bb904a13
parent 37644 33cf53901cac
child 38535 4a25025e0b0d
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Fri Apr 29 15:35:51 2016 -0700
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Fri Apr 29 19:53:19 2016 -0700
@@ -452,7 +452,7 @@
 
         // If appropriate, execute the snippet
         String value = null;
-        Exception exception = null;
+        JShellException exception = null;
         if (si.status().isDefined) {
             if (si.isExecutable()) {
                 try {
@@ -462,7 +462,8 @@
                             : "";
                 } catch (EvalException ex) {
                     exception = translateExecutionException(ex);
-                } catch (UnresolvedReferenceException ex) {
+                } catch (JShellException ex) {
+                    // UnresolvedReferenceException
                     exception = ex;
                 }
             } else if (si.subKind() == SubKind.VAR_DECLARATION_SUBKIND) {
@@ -499,7 +500,7 @@
                     || e.exception() != null;
     }
 
-    private List<SnippetEvent> events(Unit c, Collection<Unit> outs, String value, Exception exception) {
+    private List<SnippetEvent> events(Unit c, Collection<Unit> outs, String value, JShellException exception) {
         List<SnippetEvent> events = new ArrayList<>();
         events.add(c.event(value, exception));
         events.addAll(outs.stream()