-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexception.py
48 lines (33 loc) · 926 Bytes
/
exception.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
抛出错误
"""
class NotGeneratorFunctionError(Exception):
"""
函数是含有 yield 的函数
"""
def __init__(self, *args):
super(NotGeneratorFunctionError, self).__init__(*args)
class SpiderHasExistsError(Exception):
"""
spider 已存在错误
"""
def __init__(self, *args):
super(SpiderHasExistsError, self).__init__(*args)
class DropRequestException(Exception):
"""
丢弃请求
"""
def __init__(self, *args):
super(DropRequestException, self).__init__(*args)
class DropItemException(Exception):
"""
丢弃 item
"""
def __init__(self, *args):
super(DropItemException, self).__init__(*args)
class NotStrictItemFieldException(Exception):
"""
非 StrictItem 字段错误
"""
def __init__(self, *args):
super(NotStrictItemFieldException, self).__init__(*args)