diff options
author | Martin Odersky <odersky@gmail.com> | 2008-10-20 10:06:37 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-10-20 10:06:37 +0000 |
commit | e5868320d48d38687d67c8c3ffc2954815b2f14f (patch) | |
tree | 0eb944e22c5f65c2c076b85876318b32cf235df9 /src/library/scalax/util | |
parent | 9b7039e9462676d608685fb1e6242228649b21ac (diff) | |
download | scala-e5868320d48d38687d67c8c3ffc2954815b2f14f.tar.gz scala-e5868320d48d38687d67c8c3ffc2954815b2f14f.tar.bz2 scala-e5868320d48d38687d67c8c3ffc2954815b2f14f.zip |
initial collection library fragments
Diffstat (limited to 'src/library/scalax/util')
-rwxr-xr-x | src/library/scalax/util/control/Break.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/library/scalax/util/control/Break.scala b/src/library/scalax/util/control/Break.scala new file mode 100755 index 0000000000..4d43490a87 --- /dev/null +++ b/src/library/scalax/util/control/Break.scala @@ -0,0 +1,15 @@ +package scala.util.control + +object Break { + private class BreakException extends RuntimeException + private val breakException = new BreakException + def break { throw breakException } + def breakable(op: => Unit) { + try { + op + } catch { + case ex: BreakException => + } + } +} + |