diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 16:04:56 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 17:54:50 +0200 |
commit | 0f0144c74088e396fc1440166bed5a7c6d5f44f4 (patch) | |
tree | fd7cc379f1926a3e6a0b94ccb22dd071384cdeb1 /src/library/scala/util/control/Exception.scala | |
parent | 2b09d8caf5497c4e016a3e1179e5f7e842766176 (diff) | |
download | scala-0f0144c74088e396fc1440166bed5a7c6d5f44f4.tar.gz scala-0f0144c74088e396fc1440166bed5a7c6d5f44f4.tar.bz2 scala-0f0144c74088e396fc1440166bed5a7c6d5f44f4.zip |
migrates stdlib and compiler to tags
* all usages of ClassManifest and Manifest are replaced with tags
* all manifest tests are replaced with tag tests
Diffstat (limited to 'src/library/scala/util/control/Exception.scala')
-rw-r--r-- | src/library/scala/util/control/Exception.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/util/control/Exception.scala b/src/library/scala/util/control/Exception.scala index 1cae8088f5..38f4abb20a 100644 --- a/src/library/scala/util/control/Exception.scala +++ b/src/library/scala/util/control/Exception.scala @@ -30,9 +30,9 @@ import language.implicitConversions object Exception { type Catcher[+T] = PartialFunction[Throwable, T] - def mkCatcher[Ex <: Throwable: ClassManifest, T](isDef: Ex => Boolean, f: Ex => T) = new Catcher[T] { + def mkCatcher[Ex <: Throwable: ClassTag, T](isDef: Ex => Boolean, f: Ex => T) = new Catcher[T] { private def downcast(x: Throwable): Option[Ex] = - if (classManifest[Ex].erasure.isAssignableFrom(x.getClass)) Some(x.asInstanceOf[Ex]) + if (classTag[Ex].erasure.isAssignableFrom(x.getClass)) Some(x.asInstanceOf[Ex]) else None def isDefinedAt(x: Throwable) = downcast(x) exists isDef @@ -41,7 +41,7 @@ object Exception { def mkThrowableCatcher[T](isDef: Throwable => Boolean, f: Throwable => T) = mkCatcher(isDef, f) - implicit def throwableSubtypeToCatcher[Ex <: Throwable: ClassManifest, T](pf: PartialFunction[Ex, T]) = + implicit def throwableSubtypeToCatcher[Ex <: Throwable: ClassTag, T](pf: PartialFunction[Ex, T]) = mkCatcher(pf.isDefinedAt _, pf.apply _) /** !!! Not at all sure of every factor which goes into this, |