readFootnote method
Implementation
RitoFootnote readFootnote({
required int sessionId,
required int artifactId,
required String key,
}) {
final owned = _readFootnoteWire(
sessionId: sessionId,
artifactId: artifactId,
key: key,
);
try {
final footnote = footnoteDecoder.decode(owned);
if (footnote.artifactId != artifactId || footnote.key != key) {
throw const RitoNativeException(
status: 4,
message: 'Native footnote identity does not match its request.',
);
}
return footnote;
} on Object catch (error, stackTrace) {
_disposeAfterFailedSessionOutput(sessionId);
Error.throwWithStackTrace(
_terminatedSessionResultError('footnote', error),
stackTrace,
);
}
}