Skip to content

Commit

Permalink
增加异常处理
Browse files Browse the repository at this point in the history
  • Loading branch information
liujingxing committed Dec 20, 2020
1 parent a486433 commit 2a48d30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rxhttp/src/main/java/rxhttp/wrapper/param/BodyParam.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class BodyParam(
}

override fun getRequestBody(): RequestBody {
return requestBody!!
return requestBody
?: throw NullPointerException("requestBody cannot be null, please call the setBody series methods")
}

override fun add(key: String, value: Any): BodyParam {
Expand Down

0 comments on commit 2a48d30

Please sign in to comment.