1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove try/catch around lens:// route, as that happens in route() (#2935)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-06-07 08:13:48 -04:00 committed by GitHub
parent cb4a7497dd
commit 27ec650e0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
});
/**