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:
parent
cb4a7497dd
commit
27ec650e0a
@ -93,11 +93,7 @@ if (!app.requestSingleInstanceLock()) {
|
|||||||
|
|
||||||
for (const arg of process.argv) {
|
for (const arg of process.argv) {
|
||||||
if (arg.toLowerCase().startsWith("lens://")) {
|
if (arg.toLowerCase().startsWith("lens://")) {
|
||||||
try {
|
lprm.route(arg);
|
||||||
lprm.route(arg);
|
|
||||||
} catch (error) {
|
|
||||||
logger.error(`${LensProtocolRouterMain.LoggingPrefix}: an error occured`, { error, rawUrl: arg });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -107,11 +103,7 @@ app.on("second-instance", (event, argv) => {
|
|||||||
|
|
||||||
for (const arg of argv) {
|
for (const arg of argv) {
|
||||||
if (arg.toLowerCase().startsWith("lens://")) {
|
if (arg.toLowerCase().startsWith("lens://")) {
|
||||||
try {
|
lprm.route(arg);
|
||||||
lprm.route(arg);
|
|
||||||
} catch (error) {
|
|
||||||
logger.error(`${LensProtocolRouterMain.LoggingPrefix}: an error occured`, { error, rawUrl: arg });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,12 +266,7 @@ app.on("will-quit", (event) => {
|
|||||||
app.on("open-url", (event, rawUrl) => {
|
app.on("open-url", (event, rawUrl) => {
|
||||||
// lens:// protocol handler
|
// lens:// protocol handler
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
LensProtocolRouterMain.getInstance().route(rawUrl);
|
||||||
try {
|
|
||||||
LensProtocolRouterMain.getInstance().route(rawUrl);
|
|
||||||
} catch (error) {
|
|
||||||
logger.error(`${LensProtocolRouterMain.LoggingPrefix}: an error occured`, { error, rawUrl });
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user