Source code for WORC.facade.helpers.exceptions

[docs]class InvalidOrderException(Exception):
[docs] def __init__(self, function, execute_first): super(InvalidOrderException, self).__init__(f'Invalid order for function {function} call {execute_first} before calling this function')
[docs]class InvalidCsvFileException(Exception):
[docs] def __init__(self, path): super(InvalidCsvFileException, self).__init__(f'Invalid or unreadable csv file: {path}')
[docs]class PathNotFoundException(Exception):
[docs] def __init__(self, path): super(PathNotFoundException, self).__init__(f'Path not found: {path}')
[docs]class NoFeaturesFoundException(Exception):
[docs] def __init__(self, path): super(NoFeaturesFoundException, self).__init__(f'No features found in directory {path}')
[docs]class NoImagesFoundException(Exception):
[docs] def __init__(self, path): super(NoImagesFoundException, self).__init__(f'No images found in directory {path}')
[docs]class NoSegmentationsFoundException(Exception):
[docs] def __init__(self, path): super(NoSegmentationsFoundException, self).__init__(f'No segmentations found in directory {path}')
[docs]class NoMasksFoundException(Exception):
[docs] def __init__(self, path): super(NoMasksFoundException, self).__init__(f'No masks found in directory {path}')