Rick Altherr wrote: > > On Apr 14, 2009, at 1:44 PM, Øyvind Harboe wrote: > >>> I'd rather know _why_ something failed rather than having to dig >>> through the >>> code to figure out which layer and why. Not every user is a UNIX >>> programmer >>> with intimate knowledge of the targets, interfaces, and general >>> protocols. >> >> That's what the LOG_ERROR()'s are for. They tell you where and why. >> >> retval's are not propagated consistently or relyably in OpenOCD (or >> any other C program I've seen really). We could switch to a language >> with exceptions(C++), but we've had that discussion and there isn't >> a strong incentive to do so with OpenOCD now that we've got exceptions >> and resource tracking for menial stuff in Tcl. >> >> >> -- >> Øyvind Harboe >> PayBack incident management system >> Reduce costs and increase quality, free Starter Edition >> http://www.payback.no/index_en.html > > > So because it isn't that way today, we shouldn't set a policy to do so > in the future?
if( If Rick is speaking out for C++) { I second that. Getting the existing code to compile with C++ is not a large job. From that point, actually using C++'s useful features can be done over time. I dare say 2 days to get the existing code to compile with C++, at most. But I would not volunteer for this without write access to some out of the way branch of the repo during the process. } C++ exceptions make error handling easier than C, plus you get type safe linkage. Dick _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development