blob: 173188d2e9ea5bfb5b1a77fe9c74042e7a6d59aa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package scalax.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 =>
}
}
}
|