docstr: Check a `const char*` error return from an integration entrypoint.
  
  A null means success, a non-empty string is an error message.
  The string is statically allocated on the C++ side.
docstr_tok: ["Check","a","`","const","char","*","`","error","return","from","an","integration","entrypoint",".","A","null","means","success",",","a","non-empty","string","is","an","error","message",".","The","string","is","statically","allocated","on","the","C++","side","."]
code: def _check_c_error(self, c_error):
      """
      Check a `const char*` error return from an integration entrypoint.
  
      A null means success, a non-empty string is an error message.
      The string is statically allocated on the C++ side.
      """
      assert self.ffi.typeof(c_error) is self.ffi.typeof("const char*")
      if c_error != self.ffi.NULL:
          error = self.ffi.string(c_error).decode(
              "utf8", errors="replace"
          )
          raise RuntimeError(
              f"C++ C Data Integration call failed: {error}"
          )
  
imports: import contextlib
  import functools
  import os
  import subprocess
  from .None import cdata
  from .tester import Tester, CDataExporter, CDataImporter
  from .util import run_cmd, log
  from ..utils.source import ARROW_ROOT_DEFAULT
label_desc: Use image node_id 2 for calling the _CDataBase obj's underlying member method code with example usage: obj._check_c_error(c_error) without return types