[core] Change CAPI interface to assert/return an error code instead of silently exiting.
[core] Change CAPI interface to assert/return an error code instead of silently exiting.

mit-carbon/Graphite-Cycle-Level,8l/Graphite,nkawahara/Graphite,8l/Graphite,8l/Graphite,nkawahara/Graphite,mit-carbon/Graphite,nkawahara/Graphite,fhijaz/Graphite,nkawahara/Graphite,victorisildur/Graphite,victorisildur/Graphite,mit-carbon/Graphite-Cycle-Level,mit-carbon/Graphite,fhijaz/Graphite,mit-carbon/Graphite,victorisildur/Graphite,8l/Graphite,mit-carbon/Graphite,fhijaz/Graphite,mit-carbon/Graphite-Cycle-Level,victorisildur/Graphite,fhijaz/Graphite,mit-carbon/Graphite-Cycle-Level