R
Rafael
Hello List
I'm working in a logging library, and wondering:
How would you like to get a function input error? Assert, EXIT_FAILURE
or even default behavior on failure?
Like:
startup(int safe, int logto, int clear, const char* file)
assert((conf) && (file) && (safe>=0 && safe<=1) && (logto>=-1 &&
logto<=2) && (clear>=0 && clear<=1));
Hijacking my own thread, I like to know if you think is better to just
set a global variable with your function initialization data (since you
should not handle that data, anyway) or get the pointer back and pass as
argument each time you call the function.
Thanks
Rafael
I'm working in a logging library, and wondering:
How would you like to get a function input error? Assert, EXIT_FAILURE
or even default behavior on failure?
Like:
startup(int safe, int logto, int clear, const char* file)
assert((conf) && (file) && (safe>=0 && safe<=1) && (logto>=-1 &&
logto<=2) && (clear>=0 && clear<=1));
Hijacking my own thread, I like to know if you think is better to just
set a global variable with your function initialization data (since you
should not handle that data, anyway) or get the pointer back and pass as
argument each time you call the function.
Thanks
Rafael