From 0d279b3a4f51f113153be2f9e99ec6848a40de36 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Tue, 23 Jun 2015 10:44:56 +0200 Subject: [PATCH] catch file error exception --- ethkey/KeyAux.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ethkey/KeyAux.h b/ethkey/KeyAux.h index 11de30e39..24892bac0 100644 --- a/ethkey/KeyAux.h +++ b/ethkey/KeyAux.h @@ -198,7 +198,16 @@ public: if (m_masterPassword.empty()) cerr << "Aborted (empty password not allowed)." << endl; else - wallet.create(m_masterPassword); + { + try + { + wallet.create(m_masterPassword); + } + catch(Exception const& _e) + { + cerr << "unable to create wallet" << endl << boost::diagnostic_information(_e); + } + } } else if (m_mode < OperationMode::CreateWallet) {