Exceptions

Inheritance diagram of musify.exception

Core exceptions for the entire package.

Exceptions:

MusifyError

Generic base class for all Musify-related errors

MusifyKeyError

Exception raised for invalid keys.

MusifyValueError

Exception raised for invalid values.

MusifyTypeError(kind[, message])

Exception raised for invalid types.

MusifyAttributeError

Exception raised for invalid attributes.

MusifyImportError

Exception raised for import errors, usually from missing modules.

MusifyEnumError(value[, message])

Exception raised for errors related to MusifyEnum implementations.

FieldError([message, field])

Exception raised for errors related to Field enums.

exception musify.exception.MusifyError

Bases: Exception

Generic base class for all Musify-related errors

exception musify.exception.MusifyKeyError

Bases: MusifyError, KeyError

Exception raised for invalid keys.

exception musify.exception.MusifyValueError

Bases: MusifyError, ValueError

Exception raised for invalid values.

exception musify.exception.MusifyTypeError(kind, message='Invalid item type given')

Bases: MusifyError, TypeError

Exception raised for invalid types.

exception musify.exception.MusifyAttributeError

Bases: MusifyError, AttributeError

Exception raised for invalid attributes.

exception musify.exception.MusifyImportError

Bases: MusifyError, ImportError

Exception raised for import errors, usually from missing modules.

exception musify.exception.MusifyEnumError(value, message='Could not find enum')

Bases: MusifyError

Exception raised for errors related to MusifyEnum implementations.

Parameters:
  • value (Any) – The value that caused the error.

  • message (str (default: 'Could not find enum')) – Explanation of the error.

exception musify.exception.FieldError(message=None, field=None)

Bases: MusifyEnumError

Exception raised for errors related to Field enums.

Parameters:

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