Avoid checking err.stderr when it's not necessary
This commit is contained in:
@@ -547,9 +547,7 @@ export class CodeQLCliServer implements Disposable {
|
||||
yield JSON.parse(event) as EventType;
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
`Parsing output of ${description} failed: ${
|
||||
(err as any).stderr || getErrorMessage(err)
|
||||
}`,
|
||||
`Parsing output of ${description} failed: ${getErrorMessage(err)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -647,9 +645,7 @@ export class CodeQLCliServer implements Disposable {
|
||||
return JSON.parse(result) as OutputType;
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
`Parsing output of ${description} failed: ${
|
||||
(err as any).stderr || getErrorMessage(err)
|
||||
}`,
|
||||
`Parsing output of ${description} failed: ${getErrorMessage(err)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,9 +54,7 @@ export async function sarifParser(
|
||||
});
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Parsing output of interpretation failed: ${
|
||||
(e as any).stderr || getErrorMessage(e)
|
||||
}`,
|
||||
`Parsing output of interpretation failed: ${getErrorMessage(e)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user