Switching to a (hopefully) sane error-handling approach for the C interface.