diff --git a/how-to/container-platform-starter/scripts/launch.mjs b/how-to/container-platform-starter/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/container-platform-starter/scripts/launch.mjs +++ b/how-to/container-platform-starter/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/create-window/scripts/launch.mjs b/how-to/create-window/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/create-window/scripts/launch.mjs +++ b/how-to/create-window/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/integration-excel/scripts/launch.mjs b/how-to/integration-excel/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/integration-excel/scripts/launch.mjs +++ b/how-to/integration-excel/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-a-manifest/create-a-single-page-platform/scripts/launch.mjs b/how-to/use-a-manifest/create-a-single-page-platform/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-a-manifest/create-a-single-page-platform/scripts/launch.mjs +++ b/how-to/use-a-manifest/create-a-single-page-platform/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-channel-api/issue-commands-to-a-platform/scripts/launch.mjs b/how-to/use-channel-api/issue-commands-to-a-platform/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-channel-api/issue-commands-to-a-platform/scripts/launch.mjs +++ b/how-to/use-channel-api/issue-commands-to-a-platform/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-content-creation-rules/scripts/launch.mjs b/how-to/use-content-creation-rules/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-content-creation-rules/scripts/launch.mjs +++ b/how-to/use-content-creation-rules/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-dynamic-manifest/basic/scripts/launch.mjs b/how-to/use-dynamic-manifest/basic/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-dynamic-manifest/basic/scripts/launch.mjs +++ b/how-to/use-dynamic-manifest/basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-interop/setup-multi-platform-interop/scripts/launch.mjs b/how-to/use-interop/setup-multi-platform-interop/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-interop/setup-multi-platform-interop/scripts/launch.mjs +++ b/how-to/use-interop/setup-multi-platform-interop/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-launch-external-process/scripts/launch.mjs b/how-to/use-launch-external-process/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-launch-external-process/scripts/launch.mjs +++ b/how-to/use-launch-external-process/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-logging-apis/scripts/launch.mjs b/how-to/use-logging-apis/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-logging-apis/scripts/launch.mjs +++ b/how-to/use-logging-apis/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-platform/warn-before-closing-dialog/scripts/launch.mjs b/how-to/use-platform/warn-before-closing-dialog/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-platform/warn-before-closing-dialog/scripts/launch.mjs +++ b/how-to/use-platform/warn-before-closing-dialog/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-popup-window/advanced/scripts/launch.mjs b/how-to/use-popup-window/advanced/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-popup-window/advanced/scripts/launch.mjs +++ b/how-to/use-popup-window/advanced/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-popup-window/modal/scripts/launch.mjs b/how-to/use-popup-window/modal/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-popup-window/modal/scripts/launch.mjs +++ b/how-to/use-popup-window/modal/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-popup-window/multiple-results/scripts/launch.mjs b/how-to/use-popup-window/multiple-results/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-popup-window/multiple-results/scripts/launch.mjs +++ b/how-to/use-popup-window/multiple-results/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-popup-window/single-result/scripts/launch.mjs b/how-to/use-popup-window/single-result/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-popup-window/single-result/scripts/launch.mjs +++ b/how-to/use-popup-window/single-result/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-preloads/basic/scripts/launch.mjs b/how-to/use-preloads/basic/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-preloads/basic/scripts/launch.mjs +++ b/how-to/use-preloads/basic/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-preloads/restart-on-refresh/scripts/launch.mjs b/how-to/use-preloads/restart-on-refresh/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-preloads/restart-on-refresh/scripts/launch.mjs +++ b/how-to/use-preloads/restart-on-refresh/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-security-realms/scripts/launch.mjs b/how-to/use-security-realms/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-security-realms/scripts/launch.mjs +++ b/how-to/use-security-realms/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`); diff --git a/how-to/use-window-options/scripts/launch.mjs b/how-to/use-window-options/scripts/launch.mjs index ac38f6c3..fd08a2a4 100644 --- a/how-to/use-window-options/scripts/launch.mjs +++ b/how-to/use-window-options/scripts/launch.mjs @@ -31,7 +31,13 @@ async function run(manifestUrl) { await platform.quit(); } } catch (err) { - console.error(err); + if (err.toString().includes('no longer connected')) { + console.log('Platform no longer connected'); + console.log('Exiting process'); + process.exit(); + } else { + console.error(err); + } } }; console.log(`Wrapped target platform: ${manifest.platform.uuid}`);