mirror of
https://github.com/corda/corda.git
synced 2025-02-07 03:29:19 +00:00
Minor: Use exitProcess rather than System.exit, as the former interacts better with flow typing.
This commit is contained in:
parent
55646104b4
commit
e426e784b4
@ -28,6 +28,7 @@ import java.nio.file.Paths
|
|||||||
import java.security.PublicKey
|
import java.security.PublicKey
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
// TRADING DEMO
|
// TRADING DEMO
|
||||||
//
|
//
|
||||||
@ -74,8 +75,7 @@ fun main(args: Array<String>) {
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
println(e.message)
|
println(e.message)
|
||||||
printHelp()
|
printHelp()
|
||||||
System.exit(1)
|
exitProcess(1)
|
||||||
throw Exception() // TODO: Remove when upgrading to Kotlin 1.0 RC
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BriefLogFormatter.initVerbose("platform.trade")
|
BriefLogFormatter.initVerbose("platform.trade")
|
||||||
@ -141,7 +141,7 @@ fun main(args: Array<String>) {
|
|||||||
// Grab a session ID for the fake trade from the other side, then kick off the seller and sell them some junk.
|
// Grab a session ID for the fake trade from the other side, then kick off the seller and sell them some junk.
|
||||||
if (!options.has(fakeTradeWithArg)) {
|
if (!options.has(fakeTradeWithArg)) {
|
||||||
println("Need the --fake-trade-with command line argument")
|
println("Need the --fake-trade-with command line argument")
|
||||||
System.exit(1)
|
exitProcess(1)
|
||||||
}
|
}
|
||||||
val peerAddr = HostAndPort.fromString(options.valuesOf(fakeTradeWithArg).single()).withDefaultPort(Node.DEFAULT_PORT)
|
val peerAddr = HostAndPort.fromString(options.valuesOf(fakeTradeWithArg).single()).withDefaultPort(Node.DEFAULT_PORT)
|
||||||
val otherSide = ArtemisMessagingService.makeRecipient(peerAddr)
|
val otherSide = ArtemisMessagingService.makeRecipient(peerAddr)
|
||||||
@ -188,7 +188,7 @@ private fun loadConfigFile(configFile: Path): NodeConfiguration {
|
|||||||
println()
|
println()
|
||||||
println("This is the first run, so you should edit the config file in $configFile and then start the node again.")
|
println("This is the first run, so you should edit the config file in $configFile and then start the node again.")
|
||||||
println()
|
println()
|
||||||
System.exit(1)
|
exitProcess(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
val defaultLegalName = "Global MegaCorp, Ltd."
|
val defaultLegalName = "Global MegaCorp, Ltd."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user