Subject Error reporting in new API
Author Adriano dos Santos Fernandes

In the past, discussion of a new API ended with flame-wars on how the
API should report errors.

I do want present a technique for error reporting that:
1) works for C and any non-C++ languages in traditional ways (i.e.
checking states after calls)
2) works (very friendly) in C++ throwing exceptions
3) works in mixed C++ compiler environments where API was compiled with
one compiler and user application with another - at least in theory,
with compilers implementing COM-like ABI

The technique used is "throw in destructor", that is only problematic
during stack unwind. But the API is expected to never throw, so that is
not a problem.

I've just uploaded a demonstration code to this group.