mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-07-30 03:41:28 +00:00
Clean errors
This commit is contained in:
@@ -45,7 +45,7 @@ impl LightClient {
|
|||||||
// Make sure that if a wallet exists, there is no seed phrase being attempted
|
// Make sure that if a wallet exists, there is no seed phrase being attempted
|
||||||
if !seed_phrase.is_none() {
|
if !seed_phrase.is_none() {
|
||||||
return Err(io::Error::new(io::ErrorKind::AlreadyExists,
|
return Err(io::Error::new(io::ErrorKind::AlreadyExists,
|
||||||
"Cannot restore from seed, because a wallet already exists"));
|
"Cannot create a new wallet from seed, because a wallet already exists"));
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut file_buffer = BufReader::new(File::open("wallet.dat")?);
|
let mut file_buffer = BufReader::new(File::open("wallet.dat")?);
|
||||||
|
@@ -28,7 +28,13 @@ pub fn main() {
|
|||||||
.takes_value(true))
|
.takes_value(true))
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
let mut lightclient = LightClient::new(matches.value_of("seed")).unwrap();
|
let mut lightclient = match LightClient::new(matches.value_of("seed")) {
|
||||||
|
Ok(lc) => lc,
|
||||||
|
Err(e) => {
|
||||||
|
eprintln!("Failed to start wallet. Error was:\n{}", e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
println!("Starting Light Client");
|
println!("Starting Light Client");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user