File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ export async function activate(
236236 const distributionConfigListener = new DistributionConfigListener ( ) ;
237237 await initializeLogging ( ctx ) ;
238238 await initializeTelemetry ( extension , ctx ) ;
239+ addUnhandledRejectionListener ( ) ;
239240 install ( ) ;
240241
241242 const codelensProvider = new QuickEvalCodeLensProvider ( ) ;
@@ -1529,6 +1530,16 @@ async function activateWithInstalledDistribution(
15291530 } ;
15301531}
15311532
1533+ function addUnhandledRejectionListener ( ) {
1534+ process . addListener ( "unhandledRejection" , ( error : unknown ) => {
1535+ void showAndLogExceptionWithTelemetry (
1536+ redactableError ( asError ( error ) ) `Unhandled error: ${ getErrorMessage (
1537+ error ,
1538+ ) } `,
1539+ ) ;
1540+ } ) ;
1541+ }
1542+
15321543async function createQueryServer (
15331544 qlConfigurationListener : QueryServerConfigListener ,
15341545 cliServer : CodeQLCliServer ,
You can’t perform that action at this time.
0 commit comments