Exception Handling¶
-
class
pgimp.GimpException.GimpException[source]¶ Bases:
ExceptionWhen pgimp encounters a gimp related exception, it will automatically map it onto
GimpExceptionor a subtype so that you can easily handle gimp related errors.Example:
>>> from pgimp.GimpScriptRunner import GimpScriptRunner >>> try: ... GimpScriptRunner().execute('1/0') ... except Exception as e: ... str(e).split('\n')[-2] 'ZeroDivisionError: integer division or modulo by zero'
-
class
pgimp.GimpScriptRunner.GimpNotInstalledException[source]¶ Bases:
pgimp.GimpException.GimpExceptionIndicates that gimp needs to be installed on the system in order for the software to work.
-
class
pgimp.GimpScriptRunner.GimpScriptException[source]¶ Bases:
pgimp.GimpException.GimpExceptionIndicates a general error that occurred while trying to execute the script.
-
class
pgimp.GimpScriptRunner.GimpScriptExecutionTimeoutException[source]¶ Bases:
pgimp.GimpException.GimpExceptionThrown when the script execution time exceeds the specified timeout.
-
class
pgimp.GimpScriptRunner.GimpUnsupportedOSException[source]¶ Bases:
pgimp.GimpException.GimpExceptionIndicates that your operating system is not supported.