Fix warnings in protocol project

There were warnings about catch all exception handlers.
This commit is contained in:
Simon Schäfer 2017-10-18 19:54:58 +02:00
parent dc5411836a
commit 0454b873bf
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ trait JsonRpcRequestMessageFormats {
val id = try {
unbuilder.readField[String]("id")
} catch {
case _ => unbuilder.readField[Long]("id").toString
case _: Throwable => unbuilder.readField[Long]("id").toString
}
val method = unbuilder.readField[String]("method")
val params = unbuilder.lookupField("params") map {

View File

@ -27,7 +27,7 @@ trait JsonRpcResponseMessageFormats {
val id = try {
unbuilder.readField[Option[String]]("id")
} catch {
case _ => unbuilder.readField[Option[Long]]("id") map { _.toString }
case _: Throwable => unbuilder.readField[Option[Long]]("id") map { _.toString }
}
val result = unbuilder.lookupField("result") map {