Merge pull request #41 from nymtech/feature/better-error-message-for-bad-topology

Providing a nicer error than "failed on unwrap()" when topology retri…
This commit is contained in:
Jędrzej Stuczyński
2020-01-09 10:01:58 +00:00
committed by GitHub
3 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -228,7 +228,7 @@ impl NymClient {
let provider_client_listener_address: SocketAddr = topology
.get_mix_provider_nodes()
.first()
.unwrap()
.expect("Could not get a provider from the supplied network topology, are you using the right directory server?")
.client_listener;
let mut provider_client = provider_client::ProviderClient::new(
-1
View File
@@ -1,4 +1,3 @@
pub mod init;
pub mod run;
pub mod tcpsocket;
pub mod websocket;
-1
View File
@@ -109,7 +109,6 @@ pub mod built_info {
fn execute(matches: ArgMatches) -> Result<(), String> {
match matches.subcommand() {
("init", Some(m)) => Ok(commands::init::execute(m)),
("run", Some(m)) => Ok(commands::run::execute(m)),
("tcpsocket", Some(m)) => Ok(commands::tcpsocket::execute(m)),
("websocket", Some(m)) => Ok(commands::websocket::execute(m)),
_ => Err(usage()),