Skip to content

异常处理 #7

@small-dream

Description

@small-dream

我在使用中 发现 无网络情况下会奔溃 ,搜了一下
建议使用 runCatching{
}

包裹请求代码
通过 result 返回异常 做处理

Activity

lulululbj

lulululbj commented on Jul 26, 2019

@lulululbj
Owner

我在使用中 发现 无网络情况下会奔溃 ,搜了一下
建议使用 runCatching{
}

包裹请求代码
通过 result 返回异常 做处理

老哥,心有灵犀,本地代码刚 runCatching 了一部分。在 Retrofit 的 issue 下也看到了这个问题,应该是和 Retrofit 的协程扩展有关,还没找到原因,暂时就先 runCatching 处理一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @small-dream@lulululbj

        Issue actions

          异常处理 · Issue #7 · lulululbj/wanandroid