How to use the @sentry/electron.captureException function in @sentry/electron

To help you get started, we’ve selected a few @sentry/electron 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 pixel-point / kube-forwarder / src / renderer / components / ClusterAdd.vue View on Github external
const messages = errors.map(({ error, contextName }) => {
        // TODO a breadcrumb for originError
        Sentry.captureException(error)
        return this.getConnectionErrorMessage(error, contextName)
      })
github MozillaSecurity / virgo / src / renderer / components / Error / ErrorBoundary.jsx View on Github external
Sentry.withScope(scope => {
        scope.setExtra(errorInfo)
        this.setState({ eventId: Sentry.captureException(error) })
      })
      /* Collect user feedback as follow up. */
github pixel-point / kube-forwarder / src / renderer / store / modules / Connections.js View on Github external
const target = await getTarget(kubeConfig, resource, forward)
        const result = await startForward(commit, k8sPortForward, service, target)
        return { ...result, service, forward, target }
      }))

      const success = !results.find(x => !x.success)
      if (!success) {
        for (const result of results) {
          killServer(commit, result.target.localPort)
        }
      }

      return { success, results }
    } catch (error) {
      // TODO a breadcrumb for originError
      Sentry.captureException(error)
      clearStates(commit, service)
      return { success: false, error }
    }
  },
github InventivetalentDev / PluginBlueprint / main.js View on Github external
function openProject(arg) {
    console.log("openProject", arg);
    if (!arg || arg.length === 0) return;
    let projectFilePath = path.join(arg, "project.pbp");
    if (!fs.existsSync(projectFilePath)) {
        console.error("No project file found");
        dialog.showErrorBox("Not found", "Could not find a PluginBlueprint project in that directory");
        Sentry.captureException(err);
        return;
    }
    try {
        global.analytics.event("Project", "Open Project").send();
    } catch (e) {
        console.warn(e);
    }
    fs.readFile(projectFilePath, "utf-8", function (err, data) {
        if (err) {
            console.error("Failed to read project file");
            console.error(err);
            Sentry.captureException(err);
            return;
        }
        data = JSON.parse(data);
github InventivetalentDev / PluginBlueprint / main.js View on Github external
}).catch(err => {
                console.error(err);
                Sentry.captureException(err);
            })
        }
github web-pal / chronos-timetracker / app / renderer / sagas / ui.js View on Github external
export function throwError(err) {
  console.error(err);
  if (process.env.NODE_ENV === 'production') {
    Sentry.captureException(err);
  }
}
github pursuit-gg / pursuit-client / public / uploadCaptureFolderBW.html View on Github external
fs.remove(folder, (removeErr) => {
        if (removeErr) {
          console.error(removeErr);
          Sentry.captureException(removeErr);
        }
        ipc.send('capture-folder-upload-finished', folder, userId, spectator);
        window.close();
      });
    };
github poooi / poi / views / components / settings / plugin / plugin-setting-wrapper.es View on Github external
Sentry.withScope(scope => {
      scope.setExtra('componentStack', info.componentStack)
      scope.setTag('area', this.props.plugin.id)
      const eventId = Sentry.captureException(error)
      this.setState({
        hasError: true,
        error,
        info,
        eventId,
      })
    })
  }
github ooni / probe-desktop / main / index.js View on Github external
process.on('uncaughtException', error => {
  Sentry.captureException(error)
})
github SelfKeyFoundation / Identity-Wallet / src / common / logger / logger.js View on Github external
sentryLog(level, originalMsg, data, message) {
		addBreadcrumb({
			level,
			message,
			data,
			category: `${this.processName}:${this.name}`
		});
		if (originalMsg instanceof Error) {
			captureException(originalMsg);
		}
	}