-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to munit 1.0.0-M6 #210
Conversation
case _: InvocationTargetException | _: ExceptionInInitializerError | | ||
_: UndeclaredThrowableException | _: ExecutionException if x.getCause != null => | ||
// should also include InvocationTargetException and UndeclaredThrowableException, but not on SJS | ||
case _: ExceptionInInitializerError | _: ExecutionException if x.getCause != null => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These exceptions don't link for Scala.js. I'm not sure how much they matter. If anyone JVM-side complains we can always split this code cross-platform or something /shrug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the PR that fixed this was observing an ExecutionException
// https://github.com/scalameta/munit/blob/68c2d13868baec9a77384f11f97505ecc0ce3eba/munit/shared/src/main/scala/munit/MUnitRunner.scala#L318-L326 | ||
@tailrec | ||
private def rootCause(x: Throwable): Throwable = x match { | ||
case _: InvocationTargetException | _: ExceptionInInitializerError | | ||
_: UndeclaredThrowableException | _: ExecutionException if x.getCause != null => | ||
rootCause(x.getCause) | ||
case _ => x | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now a public method in MUnit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Yay deleted code :)
Yoloing, let's see what CI says :)