Changeset 6674 for lang/scala
- Timestamp:
- 02/14/08 18:25:22 (10 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/scala/sandbox/src/jp/gr/java_conf/mizu/util/Control.scala
r6413 r6674 3 3 4 4 object Control { 5 class BreakFromLoopException extends Exception5 class NonLocalEscape extends Throwable 6 6 7 7 class RichIterable[T](iterable :Iterable[T]) { … … 14 14 } 15 15 }catch { 16 case _: BreakFromLoopException=> ()16 case _:NonLocalEscape => () 17 17 } 18 18 } … … 30 30 while(x) y; () 31 31 } catch { 32 case e : BreakFromLoopException=> ()32 case e :NonLocalEscape => () 33 33 } 34 34 } … … 39 39 while(!x) y 40 40 } catch { 41 case e : BreakFromLoopException=> ()41 case e :NonLocalEscape => () 42 42 } 43 43 } … … 60 60 while(x) y 61 61 } catch { 62 case e : BreakFromLoopException=> ()62 case e :NonLocalEscape => () 63 63 } 64 64 } … … 69 69 while(!x) y 70 70 } catch { 71 case e : BreakFromLoopException=> ()71 case e :NonLocalEscape => () 72 72 } 73 73 } … … 85 85 } 86 86 87 def break = throw new BreakFromLoopException87 def break = throw new NonLocalEscape 88 88 89 89 //Usage
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)