# exceptions package

## Module contents

GRASS GIS interface to Python exceptions

exception `CalledModuleError`(module, code, returncode, errors=None)

  Bases: `subprocess.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 `DBError`

  Bases: `Exception`

exception `FatalError`

  Bases: `Exception`

exception `FlagError`

  Bases: `Exception`

exception `GrassError`

  Bases: `Exception`

exception `ImplementationError`

  Bases: `Exception`

exception `OpenError`

  Bases: `Exception`

exception `ParameterError`

  Bases: `Exception`

exception `ScriptError`(value)

  Bases: `Exception`

  Raised during script execution.

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

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

exception `Usage`

  Bases: `Exception`

Help Index | Topics Index | Keywords Index | Full Index

© 2003-2023 GRASS Development Team, GRASS GIS 8.4.0dev Reference Manual