diff options
Diffstat (limited to 'src/main/scala/spray/json/package.scala')
-rw-r--r-- | src/main/scala/spray/json/package.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/spray/json/package.scala b/src/main/scala/spray/json/package.scala index fe37c8b..f79b99e 100644 --- a/src/main/scala/spray/json/package.scala +++ b/src/main/scala/spray/json/package.scala @@ -20,7 +20,7 @@ package object json { type JsField = (String, JsValue) - def deserializationError(msg: String, cause: Throwable = null) = throw new DeserializationException(msg, cause) + def deserializationError(msg: String, cause: Throwable = null, fieldNames: List[String] = Nil) = throw new DeserializationException(msg, cause, fieldNames) def serializationError(msg: String) = throw new SerializationException(msg) def jsonReader[T](implicit reader: JsonReader[T]) = reader @@ -32,7 +32,7 @@ package object json { package json { - class DeserializationException(msg: String, cause: Throwable = null) extends RuntimeException(msg, cause) + case class DeserializationException(msg: String, cause: Throwable = null, fieldNames: List[String] = Nil) extends RuntimeException(msg, cause) class SerializationException(msg: String) extends RuntimeException(msg) private[json] class PimpedAny[T](any: T) { @@ -44,4 +44,4 @@ package json { def asJson: JsValue = parseJson def parseJson: JsValue = JsonParser(string) } -}
\ No newline at end of file +} |