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
privatedefrootCause(x: Throwable):Throwable= x match {
case_: InvocationTargetException|_: ExceptionInInitializerError|_: UndeclaredThrowableException|_: ExecutionExceptionif x.getCause !=null=>
rootCause(x.getCause)
case _ => x
}
We should remove the handling of InvocationTargetException and UndeclaredThrowableException, which are not available on ScalaJS.
Ultimately I don't believe these two exceptions need to be unwrapped to address the issue reported in assert fail throws Boxed Error #275 which only needed unwrapping of ExecutionException
Munit has a handy utility for unwrapping exceptions to provide better error messages.
rootCause
:This was introduce in #277 where it was ultimately copied from a Scala compiler util.
I think we should expose
rootCause
underprivate[munit]
so that third-party integrations like scalacheck-effect can use it without copying.We should remove the handling of
InvocationTargetException
andUndeclaredThrowableException
, which are not available on ScalaJS.ExecutionException
I think the Scala compiler util included
InvocationTargetException
andUndeclaredThrowableException
because it was used in signal handling code that dealt with more than just Futures. I think you can see this in the PR that introducedUndeclaredThrowableException
to this code: scala/scala@1fcb865#diff-6624212dec6b02c76a7ef6d0a388f0d0f6b9ad71b520020d493d5c4880d9db3fR120The text was updated successfully, but these errors were encountered: