CORDA-2783 - Improve error message for initial registration with devMode=true (#4928)

This commit is contained in:
Tommy Lillehagen 2019-03-25 15:16:58 +00:00 committed by GitHub
parent 07031ae0fe
commit 48e008d271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,9 @@ open class SharedNodeCmdLineOptions {
class InitialRegistrationCmdLineOptions : SharedNodeCmdLineOptions() {
override fun parseConfiguration(configuration: Config): Valid<NodeConfiguration> {
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."
}