readPage method
What page pageIndex of a live artifact holds for a host.
Implementation
RitoPageRecords readPage({
required int sessionId,
required int artifactId,
required int pageIndex,
}) {
final owned = _readPageWire(
sessionId: sessionId,
artifactId: artifactId,
pageIndex: pageIndex,
);
try {
final records = artifactDecoder.decodePageRecords(owned);
if (records.artifactId != artifactId || records.pageIndex != pageIndex) {
throw const RitoNativeException(
status: 4,
message: 'Native page records identity does not match its request.',
);
}
return records;
} on Object catch (error, stackTrace) {
_disposeAfterFailedSessionOutput(sessionId);
Error.throwWithStackTrace(
_terminatedSessionResultError('page records', error),
stackTrace,
);
}
}