How to use the @wireapp/store-engine.StoreEngine.error function in @wireapp/store-engine

To help you get started, we’ve selected a few @wireapp/store-engine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wireapp / wire-web-packages / packages / cryptobox / src / main / store / IndexedDB.ts View on Github external
return Promise.resolve().then(() => {
      if (entity) {
        this.logger.log(`Add record "${primary_key}" in object store "${store_name}"...`, entity);
        return this.db[store_name].add(entity, primary_key);
      }

      throw new StoreEngine.error.RecordTypeError(
        `Entity is "undefined" or "null". Store name "${store_name}", Primary Key "${primary_key}".`
      );
    });
  }