mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
e643067d0e
commit
958fe132ae
1 file changed
+9
-1
@@ -24,6 +24,11 @@ import { sentryDsn, isProduction } from "./vars";
|
|||||||
import { UserStore } from "./user-store";
|
import { UserStore } from "./user-store";
|
||||||
import logger from "../main/logger";
|
import logger from "../main/logger";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function bypasses webpack issues.
|
||||||
|
*
|
||||||
|
* See: https://docs.sentry.io/platforms/javascript/guides/electron/#webpack-configuration
|
||||||
|
*/
|
||||||
async function requireSentry() {
|
async function requireSentry() {
|
||||||
switch (process.type) {
|
switch (process.type) {
|
||||||
case "browser":
|
case "browser":
|
||||||
@@ -35,7 +40,10 @@ async function requireSentry() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function SentryInit() {
|
/**
|
||||||
|
* Initialize Sentry for the current process so to send errors for debugging.
|
||||||
|
*/
|
||||||
|
export async function SentryInit(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const Sentry = await requireSentry();
|
const Sentry = await requireSentry();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user