Fix ambiguous defaulted constructor

This commit is contained in:
rick.parker 2017-09-28 17:33:17 +01:00
parent 89478c8f48
commit ec9bafe1dd
2 changed files with 3 additions and 3 deletions

View File

@ -60,8 +60,8 @@ open class CordaException internal constructor(override var originalExceptionCla
} }
open class CordaRuntimeException(override var originalExceptionClassName: String?, open class CordaRuntimeException(override var originalExceptionClassName: String?,
private var _message: String? = null, private var _message: String?,
private var _cause: Throwable? = null) : RuntimeException(null, null, true, true), CordaThrowable { private var _cause: Throwable?) : RuntimeException(null, null, true, true), CordaThrowable {
constructor(message: String?, cause: Throwable?) : this(null, message, cause) constructor(message: String?, cause: Throwable?) : this(null, message, cause)
constructor(message: String?) : this(null, message, null) constructor(message: String?) : this(null, message, null)

View File

@ -67,7 +67,7 @@ class ThrowableSerializer(factory: SerializerFactory) : CustomSerializer.Proxy<T
logger.warn("Unexpected exception de-serializing throwable: ${proxy.exceptionClass}. Converting to CordaRuntimeException.", e) logger.warn("Unexpected exception de-serializing throwable: ${proxy.exceptionClass}. Converting to CordaRuntimeException.", e)
} }
// If the criteria are not met or we experience an exception constructing the exception, we fall back to our own unchecked exception. // If the criteria are not met or we experience an exception constructing the exception, we fall back to our own unchecked exception.
return CordaRuntimeException(proxy.exceptionClass).apply { return CordaRuntimeException(proxy.exceptionClass, null, null).apply {
this.setMessage(proxy.message) this.setMessage(proxy.message)
this.setCause(proxy.cause) this.setCause(proxy.cause)
this.stackTrace = proxy.stackTrace this.stackTrace = proxy.stackTrace