diff options
author | Miles Sabin <miles@milessabin.com> | 2009-09-09 02:45:21 +0000 |
---|---|---|
committer | Miles Sabin <miles@milessabin.com> | 2009-09-09 02:45:21 +0000 |
commit | 39023c4346f1940289c7cd663b7dd382ca7c6f0e (patch) | |
tree | 19e2ed4bbd63ab0ab432a29ecd3f0e57ab0a57c3 /src | |
parent | b06d4eb4ec8921a1d4935bf83ee8ba9c0ad08d18 (diff) | |
download | scala-39023c4346f1940289c7cd663b7dd382ca7c6f0e.tar.gz scala-39023c4346f1940289c7cd663b7dd382ca7c6f0e.tar.bz2 scala-39023c4346f1940289c7cd663b7dd382ca7c6f0e.zip |
If a ControlException propagates to the top of ...
If a ControlException propagates to the top of respond, then retry the
operation.
Diffstat (limited to 'src')
-rwxr-xr-x | src/compiler/scala/tools/nsc/interactive/Global.scala | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 7fac3f7fad..b0b82e5743 100755 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -264,13 +264,17 @@ self => // ----------------- Implementations of client commmands ----------------------- - def respond[T](result: Response[T])(op: => T): Unit = try { - result set Left(op) - } catch { - case ex => - result set Right(ex) - throw ex - } + def respond[T](result: Response[T])(op: => T): Unit = + while(true) + try { + result set Left(op) + return + } catch { + case ex : ControlException => + case ex => + result set Right(ex) + throw ex + } /** Make sure a set of compilation units is loaded and parsed */ def reloadSources(sources: List[SourceFile]) { |