/
is_exceptions.py
88 lines (59 loc) · 2.31 KB
/
is_exceptions.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""
InaSAFE Disaster risk assessment tool developed by AusAid -
**Exception Classes.**
Custom exception classes for the IS application.
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__author__ = 'tim@linfiniti.com'
__version__ = '0.3.1'
__revision__ = '$Format:%H$'
__date__ = '12/01/2011'
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
'Disaster Reduction')
class QgisPathException(Exception):
"""Custom exception for when qgispath.txt could not be read."""
pass
class TestNotImplementedException(Exception):
"""Custom exception for when a test exists only as a stub."""
pass
class InsufficientParametersException(Exception):
"""Custom exception for when insufficient parameters have been set."""
pass
class NoFunctionsFoundException(Exception):
"""Custom exception for when a no impact calculation
functions can be found."""
pass
class KeywordNotFoundException(Exception):
"""Custom exception for when a no keyword can be found."""
pass
class HashNotFoundException(Exception):
"""Custom exception for when a no keyword hash can be found."""
pass
class StyleInfoNotFoundException(Exception):
"""Custom exception for when a no styleInfo can be found."""
pass
class InvalidParameterException(Exception):
"""Custom exception for when an invalid parameter is
passed to a function."""
pass
class TranslationLoadException(Exception):
"""Custom exception handler for whe translation file fails
to load."""
pass
class InvalidKVPException(Exception):
"""An exception raised when a key value pair is invalid -
for example if the key of value is None or an empty string."""
pass
class LegendLayerException(Exception):
"""An exception raised when trying to create a legend from
a QgsMapLayer that does not have suitable characteristics to
allow a legend to be created from it."""
pass
class NoFeaturesInExtentException(Exception):
"""An exception that gets thrown when no features are within
the extent being clipped."""
pass