From 709fe096b35d9688411f24bd5d21aafa2928131c Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 11 Aug 2016 16:29:05 +0200 Subject: [PATCH] Minor: add a rootCause property to Throwable --- core/src/main/kotlin/com/r3corda/core/Utils.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/kotlin/com/r3corda/core/Utils.kt b/core/src/main/kotlin/com/r3corda/core/Utils.kt index 7d6956a842..df59864386 100644 --- a/core/src/main/kotlin/com/r3corda/core/Utils.kt +++ b/core/src/main/kotlin/com/r3corda/core/Utils.kt @@ -1,5 +1,6 @@ package com.r3corda.core +import com.google.common.base.Throwables import com.google.common.io.ByteStreams import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.MoreExecutors @@ -215,3 +216,5 @@ fun extractZipFile(zipPath: Path, toPath: Path) { } // TODO: Generic csv printing utility for clases. + +val Throwable.rootCause: Throwable get() = Throwables.getRootCause(this) \ No newline at end of file