After near 20 years of using MFC, I am trying to use the advantages of exceptions. I can see the value of descending the stack on error conditions, without having to pass on the error value at each level. Is there a way to do this with say error numbers, instead of having to construct
CException derived classes. Surely, this mechanism depends on underlying
Kernel API functions.
The DLL I am now working on has most certainly has NO GDI functions. I use MFC on this because of handy access to the
Kernel32 functions. My DLL fields questions and responds, as good as it can. It is a server based DLL, which provides an error log.
It is actually quite forgiving on stack unwinding, as it is also designed with a Garbage Collector, which automatically deletes resources which are not accessed within a time frame from creation (say 15 minutes). The prototype works well with
setjump but is not multi-threaded.
I am wondering about how to implement this type of behaviour with exceptions rather than