* Constructs a new `BuildError` with the given parameters. * * @param step the build step that failed. * @param {object} options additional options for the `BuildError`. * @param options.cause the actual cause for the build error. * @param options.outDir the absolute path to the `targ
(step, options)
| 275 | * @param options.target the target relative to `//out`. |
| 276 | */ |
| 277 | constructor(step, options) { |
| 278 | const { cause, outDir, target } = options; |
| 279 | const message = |
| 280 | step === BuildStep.GN |
| 281 | ? `\`gn' failed to initialize out directory ${outDir}` |
| 282 | : buildErrorMessageForNinja(cause, outDir, target); |
| 283 | super(message, { cause }); |
| 284 | this.step = step; |
| 285 | this.name = 'BuildError'; |
| 286 | this.target = target; |
| 287 | this.outDir = outDir; |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | /** |
nothing calls this directly
no test coverage detected