Skip to content

Commit 8bdea82

Browse files
committed
Move ConfigurationError out of util.ts
1 parent 83e1837 commit 8bdea82

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/errors/index.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* An Error class that indicates an error that occurred due to
3+
* a misconfiguration of the action or the CodeQL CLI.
4+
*/
5+
export class ConfigurationError extends Error {}

‎src/util.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ import {
2323
getEnv,
2424
type Env,
2525
} from "./environment";
26+
import { ConfigurationError } from "./errors";
2627
import * as json from "./json";
2728
import { Language } from "./languages";
2829
import { Logger } from "./logging";
2930

3031
// Re-export for backwards compatibility to avoid updating a lot of imports elsewhere.
32+
export { ConfigurationError } from "./errors";
3133
export {
3234
getRequiredEnvParam,
3335
getOptionalEnvVar,
@@ -573,12 +575,6 @@ export class HTTPError extends Error {
573575
}
574576
}
575577

576-
/**
577-
* An Error class that indicates an error that occurred due to
578-
* a misconfiguration of the action or the CodeQL CLI.
579-
*/
580-
export class ConfigurationError extends Error {}
581-
582578
export function asHTTPError(arg: any): HTTPError | undefined {
583579
if (!json.isObject<any>(arg) || !json.isString(arg.message)) {
584580
return undefined;

0 commit comments

Comments
 (0)