From: Lutz <lu...@us...> - 2005-04-04 17:09:58
|
>> On Sun, 2005-04-03 at 20:07 +0200, Jan Patera wrote: > I would return the first (or last - must be discussed) error of the > highest severity of all errors/warnings encountered. To summarize, exif-result.h would - define 30+ error/warning codes (that must be discussed) - define a hierarchy of those error codes (that must be discussed) I really doubt that programmers will implement checks for that many error codes and get some useful information out of them. gnome-vfs for example has exactly this problem. Let me propose something different. It is up to the frontends to log messages and handle the queue (like now). Functions would return one or more of the following result codes: EXIF_RESULT_NONE =3D 0, EXIF_RESULT_DEBUG =3D 1 << 0, EXIF_RESULT_WARNING =3D 1 << 1, EXIF_RESULT_ERROR =3D 1 << 2 Frontends would do: res =3D exif_data_something () if (res & EXIF_RESULT_ERROR) { "Errors have occurred..." (show logged errors) if (res & EXIF_RESULT_DEBUG) { "Additional debugging information is available. Click here to show it= ." } } else if (res & EXIF_RESULT_WARNING) { StatusBar =3D "There have been problems executing the request. " (show logged warnings) "Click here to show more info." } That is: Only a couple of result codes. Few log codes. No hierarchy. How about that? Lutz |