Skip to content

Improve error messages #201

@antond-weta

Description

@antond-weta

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 bool should also have a status property, 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions