From 27ec650e0a7de269fed6e31fdff80ef0c3c3df4f Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 7 Jun 2021 08:13:48 -0400 Subject: [PATCH] Remove try/catch around lens:// route, as that happens in route() (#2935) Signed-off-by: Sebastian Malton --- src/main/index.ts | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 0396f840a1..ea8ab894e3 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -93,11 +93,7 @@ if (!app.requestSingleInstanceLock()) { for (const arg of process.argv) { if (arg.toLowerCase().startsWith("lens://")) { - try { - lprm.route(arg); - } catch (error) { - logger.error(`${LensProtocolRouterMain.LoggingPrefix}: an error occured`, { error, rawUrl: arg }); - } + lprm.route(arg); } } } @@ -107,11 +103,7 @@ app.on("second-instance", (event, argv) => { for (const arg of argv) { if (arg.toLowerCase().startsWith("lens://")) { - try { - lprm.route(arg); - } catch (error) { - logger.error(`${LensProtocolRouterMain.LoggingPrefix}: an error occured`, { error, rawUrl: arg }); - } + lprm.route(arg); } } @@ -274,12 +266,7 @@ app.on("will-quit", (event) => { app.on("open-url", (event, rawUrl) => { // lens:// protocol handler event.preventDefault(); - - try { - LensProtocolRouterMain.getInstance().route(rawUrl); - } catch (error) { - logger.error(`${LensProtocolRouterMain.LoggingPrefix}: an error occured`, { error, rawUrl }); - } + LensProtocolRouterMain.getInstance().route(rawUrl); }); /**