Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json.loads(br.response().read())["data"] #46

Closed
MingleiLI opened this issue Jan 13, 2015 · 1 comment
Closed

json.loads(br.response().read())["data"] #46

MingleiLI opened this issue Jan 13, 2015 · 1 comment

Comments

@MingleiLI
Copy link

如果br.response().read()读取数据失败的话,这个会产生错误,是不是应该加上异常处理?

@qinxuye
Copy link
Owner

qinxuye commented Jan 15, 2015

cola中,一个parser的错误会被捕捉到,会分为几种情况
1)服务器错误
2)网络错误
3)其他

这些error的处理方式不同主要区别在于重试的次数和间隔的不同(根据配置)。

对于你说的错误,上层会被cola给捕捉,并重试一定次数。

如果用户想自己处理异常,在parser中做就可以了。

@qinxuye qinxuye closed this as completed Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants