exceptions package — GRASS Python Library documentation

# exceptions package

## Module contents

GRASS GIS interface to Python exceptions

exception exceptions.CalledModuleError(module, code, returncode, errors=None)

  Bases: `CalledProcessError`

  Raised when a called module ends with error (non-zero return code)

  Used for failures of modules called as subprocesses from Python code.

  Create an exception with a full error message based on the parameters.

  Parameters:

    - module – module name

    - code – some code snipped which contains parameters

    - returncode – process returncode (assuming non-zero)

    - errors – errors provided by the module (e.g., stderr)

exception exceptions.DBError

  Bases: `Exception`

exception exceptions.FatalError

  Bases: `Exception`

exception exceptions.FlagError

  Bases: `Exception`

exception exceptions.GrassError

  Bases: `Exception`

exception exceptions.ImplementationError

  Bases: `Exception`

exception exceptions.OpenError

  Bases: `Exception`

exception exceptions.ParameterError

  Bases: `Exception`

exception exceptions.ScriptError(value)

  Bases: `Exception`

  Raised during script execution.

      >>> error = ScriptError('My error message!')
      >>> error.value

  ‘My error message!’ >>> print(error) My error message!

exception exceptions.Usage

  Bases: `Exception`

Help Index | Topics Index | Keywords Index | Full Index

© 2003-2026 GRASS Development Team, GRASS GIS 8.4.3dev Reference Manual