[AD] Error reporting from Allegro functions |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
So my question is... which method is preferred and to what extent? Should every "return NULL;" be accompanied with a logging macro? Should every malloc be accompanied with al_set_errno(ENOMEM); ?
Although the trace macros are attractive, I find them to be problematic as they are only enabled in debug mode. While the windows binaries we supply have the debugging versions included, as far as I can tell neither the Fedora packages nor the eventual Debian packages will have this feature. Perhaps we should move away from these macros? Also non-log error reporting is more attractive from the point of view of wrappers of Allegro.
If we do move away from macros, perhaps we should add a al_set_error_string function if al_set_errno is deemed too coarse-grained.
Anyway, just some thoughts I had after reading this thread: https://www.allegro.cc/forums/thread/612095
-SL
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |