marEx.VisualisationError

exception marEx.VisualisationError(message, details=None, suggestions=None, error_code='VISUALISATION_ERROR', context=None)[source]

Bases: MarExError

Raise exception for plotting and visualisation problems.

This exception handles issues with the plotX visualisation system including matplotlib configuration, cartopy projections, and animation generation.

Common scenarios:

  • Missing plotting dependencies

  • Cartopy projection issues

  • Invalid plot configuration

  • Animation encoding failures

  • Grid type detection problems

Examples

>>> raise VisualisationError(
...     "Animation creation failed",
...     details="ffmpeg encoder not found for MP4 generation",
...     suggestions=["Install ffmpeg system package",
                      "Use alternative format: save_format='gif'",
                      "Install ffmpeg via conda: conda install ffmpeg"],
...     context={"requested_format": "mp4", "available_encoders": ["png", "gif"]}
... )

Initialise the Error.

Parameters:
__init__(message, details=None, suggestions=None, error_code='VISUALISATION_ERROR', context=None)[source]

Initialise the Error.

Parameters: