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

188
Views
How to get a raw error object on the try/catch instead of its stack

I'm trying to understand how I can get the raw object of the error in the try/catch block like so:

try {
  
} catch (error) {
  console.log(error);
}

The above is logging the stack instead of the raw object.

I'm asking this out of curiosity, because at first, I tried to print the message and not the stack and only by searching the web I could find this object has property of message.

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

0

There is error.stack which show the stack of error in string

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!