Skip to content

Commit 86dd155

Browse files
committed
ux: give more verbose message for CLI typos (#1182)
2 parents ee65e24 + 9696883 commit 86dd155

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

garak/_plugins.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,13 @@ def load_plugin(path, break_on_fail=True, config_root=_config) -> object:
406406
except Exception as e:
407407
logging.warning("Exception failed import of %s", module_path, exc_info=e)
408408
if break_on_fail:
409-
raise ValueError("Didn't successfully import " + module_name) from e
409+
raise ValueError(
410+
"❌ Didn't successfully import "
411+
+ category
412+
+ " plugin: '"
413+
+ module_name
414+
+ "'\n- Check spelling and garak log"
415+
) from e
410416
else:
411417
return False
412418

0 commit comments

Comments
 (0)