summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorMathias <mathias@spray.cc>2011-12-07 10:38:29 +0100
committerMathias <mathias@spray.cc>2011-12-07 10:38:29 +0100
commit6a5ccb2e6c37f7922db34f29c1f9cfd61a2397e8 (patch)
tree5b58cf9463bf300e92f6eedb5042f5e4c5b6e93a /README.markdown
parentfd80c9099d4d474a6080df11a5786bd7e9b5cb7f (diff)
downloadspray-json-6a5ccb2e6c37f7922db34f29c1f9cfd61a2397e8.tar.gz
spray-json-6a5ccb2e6c37f7922db34f29c1f9cfd61a2397e8.tar.bz2
spray-json-6a5ccb2e6c37f7922db34f29c1f9cfd61a2397e8.zip
Move exception into package.scala, simplify throwing of (De)SerializationExceptions
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.markdown b/README.markdown
index d8c3986..9034bec 100644
--- a/README.markdown
+++ b/README.markdown
@@ -131,7 +131,7 @@ Here is one way to do it:
case JsArray(JsString(name) :: JsNumber(red) :: JsNumber(green) :: JsNumber(blue) :: Nil) => {
new Color(name, red.toInt, green.toInt, blue.toInt)
}
- case _ => throw new DeserializationException("Color expected")
+ case _ => deserializationError("Color expected")
}
}
}
@@ -163,7 +163,7 @@ Another way would be to serialize `Color`s as JSON objects:
) => {
new Color(name.value, red.value.toInt, green.value.toInt, blue.value.toInt)
}
- case _ => throw new DeserializationException("Color expected")
+ case _ => deserializationError("Color expected")
}
}
}