question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`Error` constructor has second argument

See original GitHub issue

The Error constructor has signature Error ( message [ , options ] ) https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-error-message

But at the moment, trying to set cause or read cause leads to a type error. Playground

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yume-chancommented, Mar 18, 2022

This issue was filed before TS 4.6 and target: ES2022. The information you provided is correct.

0reactions
everhardtcommented, Mar 18, 2022

@yume-chan . Yes indeed. I don’t get your point though, you still need to set target to ES2022 to make it work right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

std::set constructor second argument error - c++ - Stack Overflow
The second parameter has to be a type. You can create a type for your function like this: struct CmpI { bool operator()(const...
Read more >
Error() constructor - JavaScript - MDN Web Docs
The Error() constructor creates an error object. ... fileName, lineNumber) signature, which requires the second parameter to be a string.
Read more >
Java Method/Constructor in Class Cannot be Applied to Given ...
Java "Method/Constructor in Class Cannot Be Applied To Given Types" happens when formal parameters and the actual parameters differ.
Read more >
SML/NJ Error Messages
A nonconstant constructor must be applied to an argument when it is used in a pattern (though not necessarily when it is used...
Read more >
CA2208: Instantiate argument exceptions correctly
When a method has a parameter, and it throws an exception type that is, or derives from, ArgumentException, it is expected to call...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found