Output stacktrace from unexpected exception in MissingClassesJoinTest

The test is currently failing on the Windows bots.

Change-Id: I76e3d798e3ec8f2a418b763493fe43f635c4b394
diff --git a/src/test/java/com/android/tools/r8/ir/analysis/type/MissingClassesJoinTest.java b/src/test/java/com/android/tools/r8/ir/analysis/type/MissingClassesJoinTest.java
index 60ab870..0483e14 100644
--- a/src/test/java/com/android/tools/r8/ir/analysis/type/MissingClassesJoinTest.java
+++ b/src/test/java/com/android/tools/r8/ir/analysis/type/MissingClassesJoinTest.java
@@ -15,6 +15,7 @@
 import com.android.tools.r8.TestParameters;
 import com.android.tools.r8.utils.BooleanUtils;
 import com.android.tools.r8.utils.StringUtils;
+import com.google.common.base.Throwables;
 import java.nio.file.Path;
 import java.util.List;
 import org.junit.Test;
@@ -97,7 +98,11 @@
       result.assertFailureWithErrorThatMatches(containsString("NullPointerException"));
     } catch (Exception e) {
       // Compilation should only fail when type errors are not allowed.
-      assertFalse(allowTypeErrors);
+      assertFalse(
+          StringUtils.joinLines(
+              "Test should only throw when type errors are not allowed",
+              Throwables.getStackTraceAsString(e)),
+          allowTypeErrors);
 
       // Verify that we fail with an assertion error.
       assertThat(e.getCause().getMessage(), containsString("AssertionError"));