mirror of
https://github.com/corda/corda.git
synced 2025-02-21 17:56:54 +00:00
irsdemo: Print more helpful error message when no role is specified (was NPE)
This commit is contained in:
parent
4b962eeb1f
commit
144f88e0d0
@ -197,7 +197,7 @@ sealed class CliParams {
|
||||
}
|
||||
|
||||
fun parse(options: OptionSet): CliParams {
|
||||
val role = options.valueOf(CliParamsSpec.roleArg)!!
|
||||
val role: IRSDemoRole = options.valueOf(CliParamsSpec.roleArg) ?: throw IllegalArgumentException("Please provide a role")
|
||||
return when (role) {
|
||||
IRSDemoRole.SetupNodeA -> parseSetupNode(options, IRSDemoNode.NodeA)
|
||||
IRSDemoRole.SetupNodeB -> parseSetupNode(options, IRSDemoNode.NodeB)
|
||||
|
Loading…
x
Reference in New Issue
Block a user