Creates an error. Applications don't usually need to.
Optionaloptions: { cause?: unknown; details?: unknown; fatal?: boolean }OptionalcauseReadonlycodeThe stable code: branch on this, not on the message.
Optional ReadonlydetailsStructured details, for some codes.
ReadonlyfatalA fault: the editor rejects new operations and stays destroyable.
Optionalstack
Why an operation failed. Every rejected promise of the API rejects with one.