Interface: ErrorReport
Defined in: model/error-report.ts:226
What the error event carries, on the Dataset and on the Gantt alike.
Flat fields plus cause, not a wrapped error: every report renders and serializes with no type
test, and nothing is lost — cause carries MutationCancelledError.changeSet,
PluginSetupError.pluginId, and the chain. Not every raise site has an error object (a silent
gesture veto has none), which is why code/message are the required pair.
Properties
at
readonlyat:Instant
Defined in: model/error-report.ts:229
When core observed it — time/'s now(), stamped by the raiser so no other layer reads a
clock (I10).
by
readonlyby:ErrorReporter
Defined in: model/error-report.ts:234
cause?
readonlyoptionalcause?:unknown
Defined in: model/error-report.ts:260
The FreeGanttError or thrown value behind it, when one exists.
code
readonlycode:ReportCode
Defined in: model/error-report.ts:230
droppedReason?
readonlyoptionaldroppedReason?:GestureDroppedReason
Defined in: model/error-report.ts:254
Why core dropped a gesture on its own — present only on 'entry-move-dropped' and
'entry-resize-dropped' (#377). One of four closed reasons, never prose: a consumer reads this
instead of matching message's English sentence.
gantt.on('error', (report) => {
if (report.droppedReason === 'entry-gone') return; // the entry is gone, nothing to retry
else if (report.droppedReason === 'data-changed') refreshDraftAndRetry();
});
severity alone already sorts 'superseded'/'discarded' ('info', the user's own doing) from
the other two ('warning', real work lost) — see GestureDroppedReason's own doc. What
severity cannot do is tell 'data-changed' from 'entry-gone', and that is the distinction
this field exists for.
entryId?
readonlyoptionalentryId?:EntryId
Defined in: model/error-report.ts:256
The entry the report is about, when it is about one.
field?
readonlyoptionalfield?:FieldKey
Defined in: model/error-report.ts:258
The Field key the report is about, when it is about one.
message
readonlymessage:string
Defined in: model/error-report.ts:232
One sentence, for a person. The console fallback prints exactly this.
reason?
readonlyoptionalreason?:string
Defined in: model/error-report.ts:239
Why the refusal happened, in the words of whoever refused — a before* handler's own sentence,
verbatim (#210). Present when a handler called refuse(reason); a bare false leaves it
undefined. Core also sets it on 'entry-remove-refused' and 'entry-clear-dates-refused', where the library refuses and says why. message quotes it too, so a console fallback prints it; this member is here so a
consumer can show their own words without core's framing around them.
severity
readonlyseverity:ErrorSeverity
Defined in: model/error-report.ts:233