Michael Wechner wrote:
[...]
the problem I see is that the DefaultDocument is an implementation
and if the implementation
itself does not throw a WARNING or an ERROR, but only higher up, then
it's very hard to debug
where the actually problem is located.
I don't understand this implication. You throw an exception when a
problem occurs. Why should you log a warning if the caller might
interpret the result of this method as a problem? Then you could
log warnings in virtually every line of the code.
I am not talking about logging warnings for every line, but for
particular cases.
You're suggesting to log warning in existsInAnyLanguage().
Some cases where this method could be used:
- preconditions of "create new document" (check if document already exists)
- moving documents (check if target document already exists)
- searching for documents by document ID
- checking for dead links
- ...
In none of these cases, a "potentially harmful situation" occurs.
Lenya currently sends you a message in the sense "no such document"
which really sucks,
because it gives you no clue why there is no such document.
How is this related to logging?
I agree that the error handling could be improved, but I don't
see the connection between warning logs and meaningless error screens ...
Is it a problem of the particular SiteManager? is it a problem of the
particular Repository?
Is it a problem of the SourceImplementation?
In the case of more complex resource types this can become even more
annoying ...
I have spent a lot of time over the last couple of days to figure out
current bugs and
just because the logging sucks. Just wait until you will spend time on
this ;-)
I guess I misunderstand this sentence - it seems to imply that
I have not spent any time fixing bugs in 1.4-dev ...
Also consider that in productive environments it will be even more a
problem.
Or do you really want to end up with something like:
"Unexpected System Failure" (go ask your admin)
?
Why do you ask me that? Did I somehow suggest that?
-- Andreas
--
Andreas Hartmann
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
[EMAIL PROTECTED] [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]