If we want to throw an error in C++ API then we'd have to change c implementation as well.