Skip to content

Commit 41737d3

Browse files
committed
Remove usage of UndeclaredThrowableException
1 parent 8cf2f09 commit 41737d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ private suspend inline fun invokeSuspend(target: Any, resolverMethod: Method, ar
255255
private fun invoke(method: Method, instance: Any, args: Array<Any?>): Any? {
256256
try {
257257
return method.invoke(instance, *args)
258-
} catch (invocationException: InvocationTargetException) {
259-
throw invocationException.cause ?: RuntimeException("Unknown error occurred while invoking resolver method")
258+
} catch (e: InvocationTargetException) {
259+
throw e.cause ?: RuntimeException("Unknown error occurred while invoking resolver method")
260260
}
261261
}
262262

0 commit comments

Comments
 (0)