Source code for centerline.exceptions
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
[docs]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)
[docs]class TooFewRidgesError(CenterlineError):
default_message = (
"Number of produced ridges is too small. Please adjust your "
"interpolation distance."
)
[docs]class UnsupportedVectorType(CenterlineError):
default_message = "No OGR driver was found for the provided file."