From 48e008d2712d7c846fc79285a77959ed36f14ae8 Mon Sep 17 00:00:00 2001 From: Tommy Lillehagen Date: Mon, 25 Mar 2019 15:16:58 +0000 Subject: [PATCH] CORDA-2783 - Improve error message for initial registration with devMode=true (#4928) --- node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt b/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt index 019d5f4b24..17eab97839 100644 --- a/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt +++ b/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt @@ -93,7 +93,9 @@ open class SharedNodeCmdLineOptions { class InitialRegistrationCmdLineOptions : SharedNodeCmdLineOptions() { override fun parseConfiguration(configuration: Config): Valid { return super.parseConfiguration(configuration).doIfValid { config -> - require(!config.devMode || config.devModeOptions?.allowCompatibilityZone == true) + require(!config.devMode || config.devModeOptions?.allowCompatibilityZone == true) { + "Cannot perform initial registration when 'devMode' is true, unless 'devModeOptions.allowCompatibilityZone' is also true." + } require(config.compatibilityZoneURL != null || config.networkServices != null) { "compatibilityZoneURL or networkServices must be present in the node configuration file in registration mode." }