You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a new property for Error instances called cause, see here for details.
Currently vitest only prints the outer Error instance like this:
Since the BuildError here is just a wrapper, we can't actually tell where the original Error is thrown as well as what the stack trace is.
It would be much helpful for debugging if vitest can also print its inner cause instance, just like how JVM does(check out that Caused by part):
Exception in thread "main" java.lang.RuntimeException: Some other message
at Exceptions.main(Exceptions.java:4)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.RuntimeException: Some message
at Exceptions.main(Exceptions.java:3)
... 5 more
Clear and concise description of the problem
There is a new property for
Error
instances calledcause
, see here for details.Currently vitest only prints the outer
Error
instance like this:Since the
BuildError
here is just a wrapper, we can't actually tell where the originalError
is thrown as well as what the stack trace is.It would be much helpful for debugging if vitest can also print its inner
cause
instance, just like how JVM does(check out thatCaused by
part):Suggested solution
See above
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: