SparkILoop - simplify recovery procedure

This pull request is a small refactor so that a partial function (hence a closure) is not created. Instead, a regular function is used. The behavior of the code is not changed.
Note: if you look into the source code of the scala compiler, this is how throwableAsString is implemented.