From 45d8253bab4f83ade2502b00fdff16330a33c71f Mon Sep 17 00:00:00 2001 From: Geod24 Date: Mon, 11 Oct 2021 02:14:54 +0900 Subject: [PATCH] Client: Make 'address' a required option And print the error message in a more user-friendly way. --- source/agora/cli/client/Common.d | 2 +- source/agora/cli/client/GenTxProcess.d | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/agora/cli/client/Common.d b/source/agora/cli/client/Common.d index 1452a03f7b2..3e33ba43695 100644 --- a/source/agora/cli/client/Common.d +++ b/source/agora/cli/client/Common.d @@ -50,7 +50,7 @@ public struct ClientCLIArgs passThrough ? config.keepEndOfOptions : config.caseInsensitive, passThrough ? config.passThrough : config.noPassThrough, - "address", + config.required, "address", "Address of a node to send to (including protocol and optionally the port if non-standard)", &this.address, ); diff --git a/source/agora/cli/client/GenTxProcess.d b/source/agora/cli/client/GenTxProcess.d index 6d59da7ed0b..af194ed5d9f 100644 --- a/source/agora/cli/client/GenTxProcess.d +++ b/source/agora/cli/client/GenTxProcess.d @@ -120,7 +120,7 @@ public int genTxProcess (string[] args, ref string[] outputs, } catch (Exception ex) { - writeln("Exception while generating transactions: ", ex); + writeln("Error: ", ex.msg); printGenTxHelp(outputs); return 1; }