Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 53 lines (37 sloc) 1.254 kb
c359a34 Pablo Hoffman moved scrapy.core.exceptions to scrapy.exceptions, keeping backwards com...
pablohoffman authored
1 """
2 Scrapy core exceptions
3
4 These exceptions are documented in docs/topics/exceptions.rst. Please don't add
5 new exceptions here without documenting them there.
6 """
7
8 # Internal
9
10 class NotConfigured(Exception):
11 """Indicates a missing configuration situation"""
12 pass
13
14 # HTTP and crawling
15
16 class IgnoreRequest(Exception):
17 """Indicates a decision was made not to process a request"""
18
19 class DontCloseSpider(Exception):
20 """Request the spider not to be closed yet"""
21 pass
22
4fde1ef Pablo Hoffman added CloseSpider exception, to manually close spiders
pablohoffman authored
23 class CloseSpider(Exception):
24 """Raise this from callbacks to request the spider to be closed"""
25
26 def __init__(self, reason='cancelled'):
27 self.reason = reason
28
c359a34 Pablo Hoffman moved scrapy.core.exceptions to scrapy.exceptions, keeping backwards com...
pablohoffman authored
29 # Items
30
31 class DropItem(Exception):
32 """Drop item from the item pipeline"""
33 pass
34
35 class NotSupported(Exception):
36 """Indicates a feature or method is not supported"""
37 pass
59f09c5 Pablo Hoffman Yet another scrapy.cmdline code refactoring by removing --settings and -...
pablohoffman authored
38
39 # Commands
40
41 class UsageError(Exception):
42 """To indicate a command-line usage error"""
43 def __init__(self, *a, **kw):
44 self.print_help = kw.pop('print_help', True)
45 super(UsageError, self).__init__(*a, **kw)
0eaa1d9 Pablo Hoffman replaced DeprecationWarning by a new ScrapyDeprecationWarning category, ...
pablohoffman authored
46
47 class ScrapyDeprecationWarning(Warning):
48 """Warning category for deprecated features, since the default
49 DeprecationWarning is silenced on Python 2.7+
50 """
51 pass
52
Something went wrong with that request. Please try again.