This is an automated email from the ASF dual-hosted git repository.
shanedell pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git
The following commit(s) were added to refs/heads/main by this push:
new 45d21cb Catch arbitrary exception thrown during CI - Added err
callback for catching "Call cancelled" for `viewportSubscribe()`
45d21cb is described below
commit 45d21cb7502a18bf51438e17ffada867ec844a2d
Author: Robert Strickland <[email protected]>
AuthorDate: Wed Mar 15 13:23:09 2023 -0500
Catch arbitrary exception thrown during CI
- Added err callback for catching "Call cancelled" for
`viewportSubscribe()`
---
src/omega_edit/utils.ts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/omega_edit/utils.ts b/src/omega_edit/utils.ts
index 162187a..47d53af 100644
--- a/src/omega_edit/utils.ts
+++ b/src/omega_edit/utils.ts
@@ -70,6 +70,10 @@ export async function viewportSubscribe(
getLogger().debug(`viewport event received: ${viewportId}`)
await setViewportDataForPanel(panel, viewportId)
})
+ .on('error', (err) => {
+ // Call cancelled thrown sometimes when server is shutdown
+ if (!err.message.includes('Call cancelled')) throw err
+ })
}
export class DisplayState {