Catch java exceptions explicitly in REPL loop, fix #854.
Eliminate warnings if a java exception is rescued.
Add tests for exception rescuing in REPL.
Avoid warning.
Merge remote-tracking branch 'origin/pr/887'