mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Re-throw exception in createStatusReportBase when in test mode
This commit is contained in:
3
lib/analyze-action.js
generated
3
lib/analyze-action.js
generated
@@ -94123,6 +94123,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
||||||
);
|
);
|
||||||
|
if (isInTestMode()) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
lib/autobuild-action.js
generated
3
lib/autobuild-action.js
generated
@@ -79872,6 +79872,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
||||||
);
|
);
|
||||||
|
if (isInTestMode()) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
lib/init-action-post.js
generated
3
lib/init-action-post.js
generated
@@ -131599,6 +131599,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
||||||
);
|
);
|
||||||
|
if (isInTestMode()) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
lib/init-action.js
generated
3
lib/init-action.js
generated
@@ -90274,6 +90274,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
||||||
);
|
);
|
||||||
|
if (isInTestMode()) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
lib/resolve-environment-action.js
generated
3
lib/resolve-environment-action.js
generated
@@ -79499,6 +79499,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
||||||
);
|
);
|
||||||
|
if (isInTestMode()) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
lib/start-proxy-action.js
generated
3
lib/start-proxy-action.js
generated
@@ -95649,6 +95649,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
||||||
);
|
);
|
||||||
|
if (isInTestMode()) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
lib/upload-sarif-action.js
generated
3
lib/upload-sarif-action.js
generated
@@ -89910,6 +89910,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
|
||||||
);
|
);
|
||||||
|
if (isInTestMode()) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -375,6 +375,12 @@ export async function createStatusReportBase(
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`,
|
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Re-throw the exception in test mode. While testing, we want to know if something goes wrong here.
|
||||||
|
if (isInTestMode()) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user