Closed git-afsantos closed 2 months ago
https://github.com/git-afsantos/haros/issues/72#issuecomment-519729404
The documentation did not mention that the plugin name must be preceded by "harosplugin", and the error message made it sound like no plugins (at all) were found instead of just this particular plugin not being found.
Try to distinguish between not finding any plugins and simply not finding any for the user-provided names.
For most errors, the user is presented a stack trace of the corresponding exception. As suggested in #41, better error messages should be provided.
To accomplish this, a central error reporting utility might be a good idea, so as to avoid spreading
print
all over the place. Theutil.py
script is a good candidate for this.It might also be worth it to change the current logging behaviour. Use two loggers, instead of one. One, by default, prints everything from
INFO
and above to the log file, unless--debug
is set, in which caseDEBUG
is also logged. The second logger is used with a better formatting to print messages to the user.Another interesting idea, while messing with error handling, is to define custom exit codes, so that failures are better identified. See this SO answer or this page for ideas of standard and unallocated error codes.