From f7471675d44a1a20c0e10790d3234a228b08262e Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sun, 14 Feb 2016 06:29:47 -0800 Subject: [PATCH] Refactor. --- .../src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt index 7adbafd2..4729ce36 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt @@ -74,8 +74,8 @@ public class DynamicGraphExecutor(val graph: DynamicGraph, } catch(ex: TimeoutException) { log(2, "Time out") } catch(ex: Exception) { - if (ex.cause is InvocationTargetException) { - val ite = ex.cause + val ite = ex.cause + if (ite is InvocationTargetException) { if (ite.targetException is KobaltException) { throw (ex.cause as InvocationTargetException).targetException } else {