Skip to content

Endo API documentation - v0.2.0 / Exports / @endo/captp / MakeMarshalOptions

Interface: MakeMarshalOptions

@endo/captp.MakeMarshalOptions

Table of contents

Properties

Properties

errorIdNum

errorIdNum: undefined | number

Ascending numbers staring from here identify the sending of errors relative to this marshal instance.

Defined in

packages/marshal/src/types.js:117


errorTagging

errorTagging: undefined | "off" | "on"

controls whether serialized errors also carry tagging information, made from marshalName and numbers generated (currently by counting) starting at errorIdNum. The errorTagging option defaults to 'on'. Serialized errors are also logged to marshalSaveError only if tagging is 'on'.

Defined in

packages/marshal/src/types.js:111


marshalName

marshalName: undefined | string

Used to identify sent errors.

Defined in

packages/marshal/src/types.js:116


marshalSaveError

marshalSaveError: undefined | (err: Error) => void

If errorTagging is 'on', then errors serialized by this marshal instance are also logged by calling marshalSaveError after annotateError associated that error with its errorId. Thus, if marshalSaveError in turn logs to the normal console, which is the default, then the console will show that note showing the associated errorId.

Defined in

packages/marshal/src/types.js:119


serializeBodyFormat

serializeBodyFormat: undefined | "capdata" | "smallcaps"

Formatting to use in the "body" property in objects returned from serialize. The body string for each case:

  • 'capdata' - a JSON string, from an encoding of passables into JSON, where some values are represented as objects with a '@qclass property.
  • 'smallcaps' - a JSON string prefixed with '#', which is an unambiguous signal since a valid JSON string cannot begin with '#'.

Defined in

packages/marshal/src/types.js:125