Fix error codes relatively to the C++ library