[GRASS-git] [OSGeo/grass] 8b2bf0: pythonlib: Use more specific language in CalledMod...

Vaclav Petras noreply at github.com
Mon May 10 17:39:22 PDT 2021


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 8b2bf0462869715a4f4738535b4ca318e9e4fcbe
      https://github.com/OSGeo/grass/commit/8b2bf0462869715a4f4738535b4ca318e9e4fcbe
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2021-05-10 (Mon, 10 May 2021)

  Changed paths:
    M python/grass/exceptions/__init__.py

  Log Message:
  -----------
  pythonlib: Use more specific language in CalledModuleError (#1525)

The error message coming from CalledModuleError was not sufficient for users to find
the error output of a module. This now explicitly says to look above traceback (case
for user scripts) while mentioning the more general case of testing framework and
(Jupyter) notebooks with default (GRASS) settings where stderr shows in a different
place than the traceback.

The module name is now included only if provided and if not already present avoiding
the `None r.univar` and `r.univar r.univar` cases. Backticks are used to mark the code,
although a) the code formatting is still unresolved (e.g., a list will render as just
Python list) and b) backticks are not common in GRASS (but fit perfectly this context
in general).

This also rewrites the code with format, constructs the message without plus, and
extends documentation (in-code and docstrings).




More information about the grass-commit mailing list