Skip to content

1681-engine / index / MigrationError

Class: MigrationError ​

Defined in: src/save/migrateSave.ts:5

Why data could not be brought to the current version.

Extends ​

  • Error

Constructors ​

Constructor ​

ts
new MigrationError(
   message, 
   reason, 
   fromVersion, 
   options?
): MigrationError;

Defined in: src/save/migrateSave.ts:6

Parameters ​

ParameterType
messagestring
reason"too-new" | "no-migration" | "migration-failed"
fromVersionnumber
options?{ cause?: unknown; }
options.cause?unknown

Returns ​

MigrationError

Overrides ​

ts
Error.constructor

Properties ​

fromVersion ​

ts
readonly fromVersion: number;

Defined in: src/save/migrateSave.ts:9


reason ​

ts
readonly reason: "too-new" | "no-migration" | "migration-failed";

Defined in: src/save/migrateSave.ts:8

Released under the MIT License.