
Yes. There should be a public fatal error handler with a default implementation which calls exit(). There is already a comment in error.c which says that such a feature would be nice to have...
I've implemented this, except that in my version the exit() is still there. The reason for this is that if the user's fatal handler returns, libsmi would likely core dump pretty soon afterwards, since it would continue trying to use the data structures that are likely corrupt in some way -- there really needs to be setjmp()/longjmp() exception handling going on here to allow the fatal handler to cause the libsmi library function that the user called to terminate. There would also have to be a libsmi global flag that a fatal error had occurred, that only gets cleared on smiExit() (or something) that causes all other library functions to return with an error, to prevent the possibly-bad data structures from being used. (And hope that smiExit() is robust to possibly-bad data structures...)
Bill -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.