Error Reporting
Errors should be reported from the module that both detects an error and knows what the error is.
Several major advantages to keeping error messages together:
- Easier to keep wording and format of messages consistent.
- Possible to keep the text of a message in disk file as opposed to within the code.
- Easier to avoid duplicate messages.
- Easier to update and translate messages to a foreign language.