MCPcopy Create free account
hub / github.com/couchbase/fleece / FLEncoder_FinishDoc

Function FLEncoder_FinishDoc

Fleece/API_Impl/Fleece.cc:723–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

721}
722
723FLDoc FLEncoder_FinishDoc(FLEncoder e, FLError *outError) FLAPI {
724 if (e->fleeceEncoder) {
725 if (!e->hasError()) {
726 try {
727 return retain(e->fleeceEncoder->finishDoc()); // finish() can throw
728 } catch (const std::exception &x) {
729 e->recordException(x);
730 }
731 }
732 } else {
733 e->errorCode = kFLUnsupported; // Doc class doesn't support JSON data
734 }
735 // Failure:
736 if (outError)
737 *outError = e->errorCode;
738 e->reset();
739 return nullptr;
740}
741
742
743FLSliceResult FLEncoder_Finish(FLEncoder e, FLError *outError) FLAPI {

Callers 1

finishDocMethod · 0.85

Calls 5

retainFunction · 0.85
hasErrorMethod · 0.80
recordExceptionMethod · 0.80
finishDocMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected