--- 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()