Skip to content

Commit

Permalink
[Console] Track plugin file path into error stack; iTXTech/mirai-cons…
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlatemp committed Jul 24, 2022
1 parent 42334c4 commit 9a8b696
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ internal class JvmPluginClassLoaderN : URLClassLoader {
this.sharedLibrariesLogger = ctx.sharedLibrariesLoader
this.file = file
this.ctx = ctx
init0()
init1()
}

@Suppress("Since15")
Expand All @@ -218,7 +218,16 @@ internal class JvmPluginClassLoaderN : URLClassLoader {
this.sharedLibrariesLogger = ctx.sharedLibrariesLoader
this.file = file
this.ctx = ctx
init0()
init1()
}

private fun init1() {
try {
init0()
} catch (e: Throwable) {
e.addSuppressed(RuntimeException("Failed to initialize new JvmPluginClassLoader, file=$file"))
throw e
}
}

private fun init0() {
Expand Down

0 comments on commit 9a8b696

Please sign in to comment.