diff options
author | michelou <michelou@epfl.ch> | 2006-08-31 13:52:34 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-08-31 13:52:34 +0000 |
commit | 5a8391bb88f3dd65458a77539a1475eaa84cc434 (patch) | |
tree | c872432cac89bbf51a6aa70e51812c85ff80e5e9 /src/library/scala/MatchError.scala | |
parent | 33637d5c2f9c10c027ec16e8be31c36fb0f2c9ff (diff) | |
download | scala-5a8391bb88f3dd65458a77539a1475eaa84cc434.tar.gz scala-5a8391bb88f3dd65458a77539a1475eaa84cc434.tar.bz2 scala-5a8391bb88f3dd65458a77539a1475eaa84cc434.zip |
cleaned up code in library/scala/**/*.scala
Diffstat (limited to 'src/library/scala/MatchError.scala')
-rw-r--r-- | src/library/scala/MatchError.scala | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/library/scala/MatchError.scala b/src/library/scala/MatchError.scala index 6f2c3ea95e..a26c5087ce 100644 --- a/src/library/scala/MatchError.scala +++ b/src/library/scala/MatchError.scala @@ -9,7 +9,7 @@ // $Id$ -package scala; +package scala import Predef._ @@ -24,7 +24,8 @@ import Predef._ object MatchError { // todo: change pattern matcher so that dummy type parameter T can be removed. - def fail[T](source: String, line: Int): Nothing = throw new MatchError(source, line); + def fail[T](source: String, line: Int): Nothing = + throw new MatchError(source, line) def report(source: String, line: Int, obj: Any) = try { @@ -36,11 +37,12 @@ object MatchError { } final class MatchError(msg: String) extends Error(msg) { - def this(source: String, line: Int) = - this(" in '" + source + "' at line " + line); - def this(source: String, line: Int, obj: String) = - this("for object " + obj + " in '" + source + "' at line " + line); + def this(source: String, line: Int) = + this(" in '" + source + "' at line " + line) - def this(ob:Any) = - this(ob.toString()); + def this(source: String, line: Int, obj: String) = + this("for object " + obj + " in '" + source + "' at line " + line) + + def this(ob: Any) = + this(ob.toString()) } |