exceptions for the rest of C API methods