print message and stack trace when exception occurs in completion

This commit is contained in:
Mark Harrah 2012-05-21 22:23:44 -04:00
parent 9cf2c41fb8
commit e34b8e4bf2
1 changed files with 6 additions and 1 deletions

View File

@ -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
}
}
}