summaryrefslogtreecommitdiff
path: root/src/main/scala/cc/spray/json/ProductFormats.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/cc/spray/json/ProductFormats.scala')
-rw-r--r--src/main/scala/cc/spray/json/ProductFormats.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/scala/cc/spray/json/ProductFormats.scala b/src/main/scala/cc/spray/json/ProductFormats.scala
index d82cbf9..6a79f5f 100644
--- a/src/main/scala/cc/spray/json/ProductFormats.scala
+++ b/src/main/scala/cc/spray/json/ProductFormats.scala
@@ -16,8 +16,6 @@
package cc.spray.json
-import annotation.tailrec
-
/**
* Provides the helpers for constructing custom JsonFormat implementations for types implementing the Product trait
* (especially case classes)
@@ -416,9 +414,9 @@ trait ProductFormats {
catch {
case e: NoSuchElementException if !fieldFound =>
if (reader.isInstanceOf[OptionFormat[_]]) None.asInstanceOf[T]
- else throw new DeserializationException("Object is missing required member '" + fieldName + "'", e)
+ else deserializationError("Object is missing required member '" + fieldName + "'", e)
}
- case _ => throw new DeserializationException("Object expected")
+ case _ => deserializationError("Object expected")
}
}
}