-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Each level of the tool should only have the info in the error messages relevant to that level.
Here is an example of the issue. When using the rawtoaces_util library, calling ImageConverter.process_image() prints out this:
ERROR: file "/path/to/the/output/file.exr" already exists. Use --overwrite to allow overwriting existing files. Skipping this file.
This is incorrect, because there is no --overwrite parameter anywhere but the command line tool.
The error message from the ImageConverter should instead suggest using ImageConverter.settings.overwrite = true and set some kind of status code, upon receiving which the higher level code could elaborate the error message further, say by suggesting using --overwrite in case of the command line tool.
Suggested solution:
- Each class which has methods returning
boolshould also have astatusproperty, which would hold the latest call's error code. - Each instance of reporting an error to the user should be providing only the relevant info, not assuming the higher level use case.