Exceptions

Inheritance diagram of musify.file.exception

Exceptions relating to file operations.

Exceptions:

FileError([file, message])

Exception raised for file errors.

InvalidFileType(filetype[, message])

Exception raised for unrecognised file types.

FileDoesNotExistError(path[, message])

Exception raised when a file cannot be found.

ImageLoadError([file, message])

Exception raised for errors in loading an image.

exception musify.file.exception.FileError(file=None, message=None)

Bases: MusifyError

Exception raised for file errors.

Parameters:
  • file (str | None (default: None)) – The file type that caused the error.

  • message (str | None (default: None)) – Explanation of the error.

exception musify.file.exception.InvalidFileType(filetype, message='File type not recognised')

Bases: FileError

Exception raised for unrecognised file types.

Parameters:
  • filetype (str) – The file type that caused the error.

  • message (str (default: 'File type not recognised')) – Explanation of the error.

exception musify.file.exception.FileDoesNotExistError(path, message='File cannot be found')

Bases: FileError, FileNotFoundError

Exception raised when a file cannot be found.

Parameters:
  • path (str) – The path that caused the error.

  • message (str (default: 'File cannot be found')) – Explanation of the error.

exception musify.file.exception.ImageLoadError(file=None, message=None)

Bases: FileError

Exception raised for errors in loading an image.