Skip to content

Commit 1cb2b12

Browse files
committed
Add context to error messages
1 parent a6258f7 commit 1cb2b12

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

exasol/toolbox/config.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,21 @@ def validate_plugin_hook(plugin_class: type[Any]):
3636
if not has_hook_implementation:
3737
raise ValueError(
3838
f"No methods in `{plugin_class.__name__}` were found to be decorated"
39-
"with `@hookimpl`"
39+
"with `@hookimpl`. The `@hookimpl` decorator indicates that this"
40+
"will be used with pluggy and used in specific nox sessions."
41+
"Without it, this class does not modify any nox sessions."
4042
)
4143

4244
if not_specified_decorated_methods:
4345
raise ValueError(
4446
f"{len(not_specified_decorated_methods)} method(s) were "
4547
"decorated with `@hookimpl`, but these methods were not "
4648
"specified in `exasol.toolbox.nox.plugins.NoxTasks`: "
47-
f"{not_specified_decorated_methods}"
49+
f"{not_specified_decorated_methods}. The `@hookimpl` decorator indicates "
50+
"that these methods will be used by pluggy to modify specific nox sessions."
51+
"If the method was not previously specified, then no nox sessions will"
52+
"be modified. The `@hookimpl` is only used by nox sessions provided by the"
53+
"pyexasol-toolbox and not ones created for just your project."
4854
)
4955

5056
return plugin_class

0 commit comments

Comments
 (0)