How to use the electron-log.error function in electron-log

To help you get started, we’ve selected a few electron-log 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 fakob / MoviePrint_v004 / app / components / VideoPlayer.js View on Github external
onVideoError = () => {
    log.error('onVideoError');
    // log.debug(this);
    this.onDurationChange(frameCountToSeconds(this.props.file.frameCount));
    this.setState({
      loadVideo: false
    });
  }
github floating / frame / main / signers / trezor-connect / Trezor / index.js View on Github external
setTimeout(() => this.verifyAddress(index, current, display, cb, ++attempt), 500)
        } else {
          log.info('Verify Address Error: ')
          // TODO: Error Notification
          log.error(err)
          this.signers.remove(this.id)
          cb(new Error('Verify Address Error'))
        }
      } else {
        const address = result.address ? result.address.toLowerCase() : ''
        const current = this.addresses[index].toLowerCase()
        log.info('Frame has the current address as: ' + current)
        log.info('Trezor is reporting: ' + address)
        if (address !== current) {
          // TODO: Error Notification
          log.error(new Error('Address does not match device'))
          this.signers.remove(this.id)
          cb(new Error('Address does not match device'))
        } else {
          log.info('Address matches device')
          cb(null, true)
        }
      }
    })
  }
github experimentalDataAesthetics / play-splom / main.development.js View on Github external
function errorOnMain(error) {
  log.error(error);
  log.error(error.stack);
  console.error(error);
  console.error(error.stack);
  if (error.data) {
    log.error(error.data);
    console.error(error.data);
  }

  if (mainWindow) {
    mainWindow.webContents.send('dispatch-action', {
      type: 'errorOnMain',
      payload: {
        message: error.message,
        stack: error.stack,
        data: error.data
      }
    });
github experimentalDataAesthetics / play-splom / main.development.js View on Github external
function errorOnMain(error) {
  log.error(error);
  log.error(error.stack);
  console.error(error);
  console.error(error.stack);
  if (error.data) {
    log.error(error.data);
    console.error(error.data);
  }

  if (mainWindow) {
    mainWindow.webContents.send('dispatch-action', {
      type: 'errorOnMain',
      payload: {
        message: error.message,
        stack: error.stack,
        data: error.data
      }
github ETCDEVTeam / emerald-wallet / packages / desktop / electron / utils.js View on Github external
fs.unlink(filePath, (err2) => {
          if (err2) {
            log.error('Failed to delete', filePath, err);
            reject(err2);
          } else {
            resolve('deleted');
          }
        });
      }
github jxnblk / ram / renderer / CreateForm.js View on Github external
this.handleSubmit = e => {
      e.preventDefault()
      const errors = this.validate()
      const invalid = Object.keys(errors).length > 0
      this.setState({ errors })
      if (invalid) return log.error(errors)
      this.createApp()
    }
github matthew-matvei / freeman / src / common / errors / LoggedError.ts View on Github external
constructor(...args: any[]) {
        super(...args);

        Error.captureStackTrace(this, LoggedError);

        log.error(this);
    }
}
github floating / frame / main / signers / ledger / Ledger / index.js View on Github external
err.message === 'Invalid channel' ||
        err.message === 'DisconnectedDevice'
      )
      if (deviceBusy) {
        clearTimeout(this._signMessage)
        if (++this.busyCount > 20) {
          this.busyCount = 0
          return log.info('>>>>>>> Busy: Limit (10) hit, cannot open device with path, will not try again')
        } else {
          this._signMessage = setTimeout(() => this.signMessage(index, message, cb), 700)
          return log.info('>>>>>>> Busy: cannot open device with path, will try again (signMessage)')
        }
      }
      cb(err)
      await this.releaseDevice()
      log.error(err)
    }
  }