mirror of
https://github.com/corda/corda.git
synced 2025-01-20 11:39:09 +00:00
Added more useful help message that includes basic usage to the TraderDemo.
This commit is contained in:
parent
98b02e9d33
commit
24deb5a79c
@ -84,7 +84,7 @@ fun runTraderDemo(args: Array<String>): Int {
|
||||
parser.parse(*args)
|
||||
} catch (e: Exception) {
|
||||
println(e.message)
|
||||
println("Please refer to the documentation in docs/build/index.html to learn how to run the demo.")
|
||||
printHelp(parser)
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -377,3 +377,13 @@ private class TraderDemoProtocolSeller(val otherSide: Party,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun printHelp(parser: OptionParser) {
|
||||
println("""
|
||||
Usage: trader-demo --role [BUYER|SELLER] [options]
|
||||
Please refer to the documentation in docs/build/index.html for more info.
|
||||
|
||||
""".trimIndent())
|
||||
parser.printHelpOn(System.out)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user