Replies: 2 comments
-
Well, I tried that, and answered my own question:
Turns out it can be improved - here's a PR :-) In the example above, I now see:
|
Beta Was this translation helpful? Give feedback.
-
I only just stumbled across the fact that I submitted almost exactly the same suggestion a year ago. But this time I actually proposed a fix, so that's some progress at least :-) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a custom hardhat task which is attempting to call a contract with a write function which takes a tuple as the second parameter. It is failing with the following stack trace (after adding
Error.stackTraceLimit = 100;
tohardhat.config.ts
):Here is the actual object I passed as the tuple parameter (as logged by
console.log
, with some bits modified to avoid irrelevant details distracting):Maybe it's just me, but I find this error message to be very unhelpful; it raises more questions than answers:
NumberCode.encode
fail? Did I mistakenly pass a value which was supposed to be aBigNumber
, or was it OK to pass a number and have ethers convert it?argument="value"
mean? As you can see from the above, none of the values passed in the object werevalue
.value=undefined
mean? As you can see from the above, none of the values passed in the object were undefined`.If any one of these questions were answered by the error message, I'd probably be able to fill in the gaps through intelligent guesswork. But as it currently stands, I find this so cryptic that I'm just left scratching my head with no clear direction for what I should try next, except perhaps adding debugging within
node_modules
which is a pretty horrible last resort.Am I being dumb or could the error message be improved? Thanks :-)
(BTW, another problem with this stack trace is that it doesn't expose what originally triggered this code , since it's hidden behind node.js's internal
processTicksAndRejections
. I wrote about that here, although I fear that may be due to a fundamental limitation in how node.js works.)Beta Was this translation helpful? Give feedback.
All reactions