File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
developer/src/kmc/src/util Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ import Sentry from "@sentry/node";
44import KEYMAN_VERSION from "@keymanapp/keyman-version" ;
55import { spawnChild } from "./spawnAwait.js" ;
66
7+ /**
8+ * Maximum delay on shutdown of process to send pending events
9+ * to Sentry, in msec
10+ */
11+ const CLOSE_TIMEOUT = 2000 ;
12+
713const cli = process . argv . join ( ' ' ) ;
814let isInit = false ;
915
@@ -39,7 +45,7 @@ export class KeymanSentry {
3945 }
4046 } else if ( cli . includes ( 'event' ) ) {
4147 const eventId = Sentry . captureMessage ( 'Test message from -sentry-client-test-exception event' ) ;
42- await Sentry . close ( 2000 ) ;
48+ await Sentry . close ( CLOSE_TIMEOUT ) ;
4349 console . log ( `Captured test message with id ${ eventId } ` ) ;
4450 process . exit ( 0 ) ;
4551 } else {
Original file line number Diff line number Diff line change @@ -122,11 +122,11 @@ export class NodeCompilerCallbacks implements CompilerCallbacks {
122122
123123 this . messages . push ( { ...event } ) ;
124124
125- // report fatal errors to Sentry, but don't display ; note, it won't be
125+ // report fatal errors to Sentry, but don't abort ; note, it won't be
126126 // reported if user has disabled the Sentry setting
127127 if ( CompilerError . severity ( event . code ) == CompilerErrorSeverity . Fatal ) {
128- // this is async so returns a Promise, we'll let it resolve
129- // in its own time, and it can print its message then
128+ // this is async so returns a Promise, we'll let it resolve in its own
129+ // time, and it will emit a message to stderr with details at that time
130130 KeymanSentry . reportException ( event . exceptionVar , false ) ;
131131 }
132132
You can’t perform that action at this time.
0 commit comments