Skip to content

Is it possible to catch error inside Report.start callback? #5259

Answered by jiwon-mun
jiwon-mun asked this question in Q&A
Discussion options

You must be logged in to vote

After looking at other repositories, I found a way.

const report =      await StreamReport.start({
          configuration: meta.configuration,
          stdout: this.context.stdout,
      }, ()=> {
        throw new Error('error'); // emit error;
     })

if(report.hasErrors()) {
    // do something
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jiwon-mun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant