| 741 | |
| 742 | |
| 743 | FLSliceResult FLEncoder_Finish(FLEncoder e, FLError *outError) FLAPI { |
| 744 | if (!e->hasError()) { |
| 745 | try { |
| 746 | return toSliceResult(ENCODER_DO(e, finish())); // finish() can throw |
| 747 | } catch (const std::exception &x) { |
| 748 | e->recordException(x); |
| 749 | } |
| 750 | } |
| 751 | // Failure: |
| 752 | if (outError) |
| 753 | *outError = e->errorCode; |
| 754 | e->reset(); |
| 755 | return {nullptr, 0}; |
| 756 | } |
| 757 | |
| 758 | |
| 759 | #pragma mark - DOCUMENTS |
no test coverage detected