Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
How to output to the console "SUCCESS" after a successful launch, and "ERROR" after an unsuccessful one?

The question is:

I'm currently working on Node.js with the Puppeteer library and I need to print "SUCCESS" to the console after a successful run and "ERROR" after a failed run. But I don't quite understand how to do it.

I will be grateful to everyone for help.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

console.log('Success'); console.log('error'); https://nodejs.dev/learn/output-to-the-command-line-using-nodejs

about 4 years ago · Juan Pablo Isaza Report

0

You could wrap the whole thing in a try...catch

try {
  // Your Code Here
  console.log('Success')
} catch (e) {
  console.log('Error')
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!