Closed mnmkng closed 3 years ago
For some reason, the code is being minified at build time. That's why the stack trace looks ugly. It didn't used to be minified, so I'm not sure what changed.
This should be fixed by https://github.com/sindresorhus/ow/releases/tag/v0.20.0
When using
ow
with Node 12 and an unhandled exception occurs, the following is printed to the console:I find the first two lines confusing and obfuscating the actual argument validation message. There's also an extra
a
before the[ArgumentError]:
and the first line in the stack trace does not point to the location of the validation problem.Is there a way to clean this up a bit? I played with removing extra lines from the stack and rethrowing but the solution was not ideal, but I guess a tiny bit better than before. I could not find a way to programmatically generate the first part of the stack (the one showing piece of code). Maybe you know more?