mirror of https://github.com/sbt/sbt.git
Fix warnings in protocol project
There were warnings about catch all exception handlers.
This commit is contained in:
parent
dc5411836a
commit
0454b873bf
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue