sys1yagi / mastodon4j

mastodon client for java, kotlin https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md
MIT License
135 stars 28 forks source link

fix not thrown IOException of OkHttp3 #43

Closed takke closed 7 years ago

takke commented 7 years ago

wrap IOException to Mastodon4jRequestException


通信エラー発生時に容赦なく強制終了しまくるのでこんな修正をしてみました。 Kotlin の流儀に合わない部分があればご指摘ください。

codecov-io commented 7 years ago

Codecov Report

Merging #43 into master will decrease coverage by 0.9%. The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #43      +/-   ##
============================================
- Coverage     27.89%   26.99%   -0.91%     
  Complexity       60       60              
============================================
  Files            39       39              
  Lines           509      526      +17     
  Branches         65       65              
============================================
  Hits            142      142              
- Misses          358      375      +17     
  Partials          9        9
Impacted Files Coverage Δ Complexity Δ
...odon4j/api/exception/Mastodon4jRequestException.kt 0% <0%> (ø) 0 <0> (ø) :arrow_down:
...ain/java/com/sys1yagi/mastodon4j/MastodonClient.kt 0% <0%> (ø) 0 <0> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aa2ecb3...ef17b5c. Read the comment docs.

sys1yagi commented 7 years ago

👀

takke commented 7 years ago

added isErrorResponse()

sys1yagi commented 7 years ago

LGTM~