Skip to content

Commit

Permalink
report location of MissingMapper exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
maxaf committed Sep 2, 2010
1 parent 290cacf commit 902cd67
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions casbah-mapper/src/main/scala/mapper/Mapper.scala
@@ -1,5 +1,3 @@
// this stuff rocks!

package com.novus.casbah
package mapper

Expand Down Expand Up @@ -159,9 +157,9 @@ class RichPropertyDescriptor(val idx: Int, val pd: PropertyDescriptor, val paren
case Some(mapper) => mapper
case None if useTypeHints_? => Mapper(p.getClass.getName) match {
case Some(mapper) => mapper
case _ => throw new MissingMapper(ReadMapper, p.getClass)
case _ => throw new MissingMapper(ReadMapper, p.getClass, "in %s".format(this))
}
case _ => throw new MissingMapper(ReadMapper, innerType)
case _ => throw new MissingMapper(ReadMapper, innerType, "in %s".format(this))
}
}.asInstanceOf[Mapper[AnyRef]]

Expand Down

0 comments on commit 902cd67

Please sign in to comment.