-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.. _errors: | ||
|
||
Errors | ||
====== | ||
|
||
Built-in Errors | ||
--------------- | ||
|
||
这里给出了内置的错误类型。 | ||
|
||
|
||
.. class:: xpaw.errors.NotEnabled | ||
|
||
在加载组件的时候抛出的异常,表示该组件未启用。 | ||
|
||
.. class:: xpaw.errors.NetworkError | ||
|
||
在downloader下载过程中抛出的异常,例如超时、服务器无法访问等。 | ||
|
||
.. class:: xpaw.errors.IgnoreRequest | ||
|
||
在处理 :class:`~xpaw.http.HttpRequest` 时抛出的异常,表示忽略该request,例如到达了一定的重试次数等。 | ||
|
||
.. class:: xpaw.errors.IgnoreItem | ||
|
||
在处理 :class:`~xpaw.item.Item` 时抛出的异常,表示忽略该item。 | ||
|
||
.. class:: xpaw.errors.UsageError | ||
|
||
xpaw相关命令使用方法不正确时抛出的异常。 | ||
|
||
.. class:: xpaw.errors.CloseCluster | ||
|
||
在spider的处理 :class:`~xpaw.http.HttpResponse` 的回调函数中可以抛出该异常,主动停止cluster。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,7 @@ Table of Contents | |
req_resp | ||
selector | ||
settings | ||
errors | ||
|
||
.. toctree:: | ||
:caption: Advanced Usage | ||
|