Skip to content

Commit 1cc0064

Browse files
authored
fix: Internal error when getting class name
1 parent a3ffc51 commit 1cc0064

File tree

1 file changed

+2
-0
lines changed
  • randunit/src/main/kotlin/com/williamfzc/randunit/scanner

1 file changed

+2
-0
lines changed

randunit/src/main/kotlin/com/williamfzc/randunit/scanner/Scanner.kt

+2
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ open class Scanner @JvmOverloads constructor(private var cfg: ScannerConfig = Sc
4242
// avoid NoClassDef
4343
try {
4444
t.canonicalName
45+
t.simpleName
4546
} catch (e: Throwable) {
4647
// catch all the throwable (not only exceptions
4748
// should not cause any errors here whatever
4849
return when (e) {
4950
is IncompatibleClassChangeError -> false
5051
is NoClassDefFoundError -> false
52+
is InternalError -> false
5153
else -> throw e
5254
}
5355
}

0 commit comments

Comments
 (0)