blob: 173188d2e9ea5bfb5b1a77fe9c74042e7a6d59aa (
plain) (
tree)
|
|
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 =>
}
}
}
|