Improve error message for non-existent asset#457
Conversation
Now we print the name of the asset and the base directory where we looked for the error instead of throwing a null pointer exception. Fixes flutter#296
There was a problem hiding this comment.
use the logging infrastructure?
There was a problem hiding this comment.
@devoncarew 's recommendation is not to use the logging system for messages intended for humans. I don't fully understand when we're supposed to use logging and when we're supposed to just write to stdout/stderr.
There was a problem hiding this comment.
I think we were using logging too much early in the life of this tool. Generally, I think all errors should be written to stderr regardless of the logging level. Status messages to the user should probably go to stdout, again, regardless of the logging level. And only diagnostic stuff should go to logging (about to run process 'foo arg1 arg2'). This would be for users to use when things go off the rails and they're trying to determine where in the process things are breaking. And we could probably just dial the use of logging back down to use info, so there's less guesswork about which things go where.
|
LGTM |
Improve error message for non-existent asset
Now we print the name of the asset and the base directory where we looked for
the error instead of throwing a null pointer exception.
Fixes #296