-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
35 lines (20 loc) · 871 Bytes
/
exceptions.py
File metadata and controls
35 lines (20 loc) · 871 Bytes
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
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
class CenterlineError(Exception):
default_message = "An error has occured while constucting the centerline."
def __init__(self, *args, **kwargs): # pragma: no cover
if not (args or kwargs):
args = (self.default_message,)
super(CenterlineError, self).__init__(*args, **kwargs)
class InvalidInputTypeError(CenterlineError):
default_message = (
"Input geometry must be of type shapely.geometry.Polygon "
"or shapely.geometry.MultiPolygon!"
)
class TooFewRidgesError(CenterlineError):
default_message = (
"Number of produced ridges is too small. Please adjust your "
"interpolation distance."
)
class UnsupportedVectorType(CenterlineError):
default_message = "No OGR driver was found for the provided file."