From e34b8e4bf2bee184d2a7ef8ac48599519bf6b453 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Mon, 21 May 2012 22:23:44 -0400 Subject: [PATCH] print message and stack trace when exception occurs in completion --- util/complete/JLineCompletion.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/complete/JLineCompletion.scala b/util/complete/JLineCompletion.scala index 2557a1b08..0af53e262 100644 --- a/util/complete/JLineCompletion.scala +++ b/util/complete/JLineCompletion.scala @@ -28,7 +28,12 @@ object JLineCompletion val current = Some(bufferSnapshot(reader)) level = if(current == previous) level + 1 else 1 previous = current - completeImpl(reader, level) + try completeImpl(reader, level) + catch { case e: Exception => + reader.printString("\nException occurred while determining completions.") + e.printStackTrace() + false + } } }