Strata · Errors

TOO_NEW: document

upgrader.upgrade throws TOO_NEW when a document’s stamp is ahead of the code on any grammar the upgrader was given. Under a strict grammar a newer document may contain keys unknown to this code, so the document is rejected and no upgrade is attempted. The reading code must be upgraded first.

Upgrader stamp
{ theatre.buttons: 1 }
Stored document
{ text: 'Book seats', icon: 'ticket' }
Stored stamp
{ theatre.buttons: 2 }
Error
TOO_NEW
This document was written by newer code than this — reading it would be guessing.
  theatre.buttons: the document is at 2, this code knows 1
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.