|:: Re: [DNG] Latest DNG software guide…|
|This message is part of the following thread:|
|the complete thread tree sorted by date|
|Steve Litt at|
>Universal and complete error handling > Handling every error is ultimately the right thing to > do But sometimes it interferes with the pace of development > Which can lead to forgetting the algorithm > you're working on
> +My compromise: write your algorithm (sized so > that it fits your screen) > +than go back and ask yourself what happens if this > step fails for every line. > + A side effect is that it helps (me) to optimize > code size, and makes clear > + every side aspect of that so clever looking code > (which most of the > + is not so clever at all in its first iterations).
> Minimizing the tradeoff: > Make comment every time you omit error > handling, come back later to put it in Make a few error > handling functions to make error handling trivial
> + Compilers often offer macros like gcc's _FILE_, > _FUNCTION_, _LINE_ that > + make it easier to detect where that error message > came from.
> In C, use assert() and come back later to change it > to real error handling.