WrightTools.exceptions module

Custom exception types.

exception WrightTools.exceptions.DimensionalityError(expected, recieved)[source]

Bases: Exception

DimensionalityError.

__init__(expected, recieved)[source]

Dimensionality error.

Parameters:
  • expected (object) – Expected dimensionalit(ies).
  • recieved (object) – Recieved dimensionality.
exception WrightTools.exceptions.FileNotFound(path)[source]

Bases: Exception

FileNotFound.

__init__(path)[source]

Format a file not found exception.

Parameters:path (string) – Given path.
exception WrightTools.exceptions.NameNotUniqueError(name)[source]

Bases: Exception

NameNotUniqueError.

__init__(name)[source]

Format a Name Not Unique Error.

Parameters:name (string) – Name of an attribute which causes a duplication.
exception WrightTools.exceptions.VisibleDeprecationWarning[source]

Bases: Warning

VisibleDepreciationWarning.

exception WrightTools.exceptions.WrongFileTypeWarning[source]

Bases: Warning

WrongFileTypeWarning.

warn(filepath, expected)[source]

Raise warning.

Parameters:
  • filepath (string) – Given filepath.
  • expected (string) – Expected file suffix.