On Wed, May 27, 2009 at 3:20 PM, Darin Fisher <da...@chromium.org> wrote:
> I think if we require everyone to handle every failed DCHECK, then what we > will really do is compel people to write fewer DCHECKs, which means that we > will lose some of the documentation benefits. That seems undesirable to me. > I agree. Given a choice, I would say that DCHECK should just crash immediately on failure rather than relying on the code that follows it to crash. That is, treat it like an assertion--if it's false, we don't know what state the process is in, and thus don't know how to recover. > I think there really is a balance here between adding DCHECKs for the sake > of documentation / guidance to developers and dealing with runtime errors > that we really need to worry about. People just have to use best judgment > to decide when a failed DCHECK should also be handled in release builds. > For informative but non-fatal stuff, using the logging facility seems like a better solution. For example, during the Mac & Linux porting efforts we've sprinkled log messages all over, which has been very helpful. --Amanda --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---