summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2012-09-10 13:47:01 +0200
committerSimon Ochsenreither <simon@ochsenreither.de>2012-09-10 13:47:01 +0200
commitc4834f6e8c5bdf036ec2271a5bcf62ad7f8a8795 (patch)
tree442b3227f10b84882164db38816fbb951c9f4f0c
parentb7e08723d142c8227181eed283e7c982f449425a (diff)
downloadscala-c4834f6e8c5bdf036ec2271a5bcf62ad7f8a8795.tar.gz
scala-c4834f6e8c5bdf036ec2271a5bcf62ad7f8a8795.tar.bz2
scala-c4834f6e8c5bdf036ec2271a5bcf62ad7f8a8795.zip
SI-6345 Remove scala.runtime.ScalaRunTime.Try
-rw-r--r--src/library/scala/runtime/ScalaRunTime.scala29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala
index e5f5e9dc5d..a8635151ff 100644
--- a/src/library/scala/runtime/ScalaRunTime.scala
+++ b/src/library/scala/runtime/ScalaRunTime.scala
@@ -167,35 +167,6 @@ object ScalaRunTime {
def checkInitialized[T <: AnyRef](x: T): T =
if (x == null) throw new UninitializedError else x
- abstract class Try[+A] {
- def Catch[B >: A](handler: PartialFunction[Throwable, B]): B
- def Finally(fin: => Unit): A
- }
-
- def Try[A](block: => A): Try[A] = new Try[A] with Runnable {
- private var result: A = _
- private var exception: Throwable =
- try { run() ; null }
- catch {
- case e: ControlThrowable => throw e // don't catch non-local returns etc
- case e: Throwable => e
- }
-
- def run() { result = block }
-
- def Catch[B >: A](handler: PartialFunction[Throwable, B]): B =
- if (exception == null) result
- else if (handler isDefinedAt exception) handler(exception)
- else throw exception
-
- def Finally(fin: => Unit): A = {
- fin
-
- if (exception == null) result
- else throw exception
- }
- }
-
def _toString(x: Product): String =
x.productIterator.mkString(x.productPrefix + "(", ",", ")")