Source code for pygmt.exceptions

# pylint: disable=missing-docstring
#
# Custom exception types used throughout the library. All exceptions derive
# from GMTError.


[docs]class GMTError(Exception): """ Base class for all GMT related errors. """
[docs]class GMTOSError(GMTError): """ Unsupported operating system. """
[docs]class GMTCLibError(GMTError): """ Error encountered when running a function from the GMT shared library. """
[docs]class GMTCLibNotFoundError(GMTCLibError): """ Could not find the GMT shared library. """
[docs]class GMTCLibNoSessionError(GMTCLibError): """ Tried to access GMT API without a currently open GMT session. """
[docs]class GMTInvalidInput(GMTError): """ Raised when the input of a function/method is invalid. """
[docs]class GMTVersionError(GMTError): """ Raised when an incompatible version of GMT is being used. """
class GMTImageComparisonFailure(AssertionError): """ Raised when a comparison between two images fails. """