Source code for sparkle.tools.exceptions

[docs]class DataIndexError(IndexError): pass
[docs]class FileDoesNotExistError(IOError): def __init__(self, fpath): self.fpath = fpath def __str__(self): return "Attempt to access invalid file path: {}".format(self.fpath)
[docs]class DisallowedFilemodeError(IOError): def __init__(self, fpath, mode): self.fpath = fpath self.mode = mode def __str__(self): return "Attempt to access file {}, with invalid filemode {}".format(self.fpath, self.mode)
[docs]class ReadOnlyError(IOError): def __init__(self, fpath): self.fpath = fpath def __str__(self): return "Attempt to write to read only file {}".format(self.fpath)
[docs]class OverwriteFileError(IOError): def __init__(self, fpath): self.fpath = fpath def __str__(self): return "Attempt to write over existing file {}".format(self.fpath)