Now that Velocity application exceptions are based on RuntimeException, we have more opportunity to use exceptions to signal application level problems. I'm particularly concerned about initialization problems that are logged and may be missed. We need to review all logged error messages and see if it would be more appropriate to throw an exception instead. Some of these places we may need to leave as is for backwards compatibility reasons. (e.g. macro in the global macro library doesn't parse properly).
Llewellyn Falco made a good case for this on the dev list recently:
I still would like to put in my vote that sending error's to the log is an incredibly BAD idea.
If something is not working, it should be LOUDLY shown as an exception.
If it is working I don't really need a log.
The (velocity) log should be there for velocity developers (those programming the actual velocity code) not users.
I don't ever care to see tomcat's log, I care to see the things I log while in tomcat.
Most of all, many many many people do not check the log at all, let alone frequently.
|Field||Original Value||New Value|
|Component/s||Source [ 12310214 ]|
|Component/s||Engine [ 12311337 ]|
|Fix Version/s||1.6 [ 12310290 ]|
|Resolution||Fixed [ 1 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Workflow||jira [ 12386985 ]||Default workflow, editable Closed status [ 12551534 ]|
|Workflow||Default workflow, editable Closed status [ 12551534 ]||jira [ 12552420 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|688d 12h 15m||1||Nathan Bubna||02/Sep/08 21:29|