aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-02-05 11:08:05 +0100
committerJaquee <jaquee.monero@gmail.com>2017-02-05 11:08:05 +0100
commit4efc926d28c125d220df7d7d68747d7aad776ab0 (patch)
treeb1a66cf0f3aba39f99162d3924aa2f55a71c5b89
parentMerge pull request #1669 (diff)
downloadmonero-4efc926d28c125d220df7d7d68747d7aad776ab0.tar.xz
Wallet API: Catch error from tools::is_local_address
-rw-r--r--src/wallet/api/utils.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wallet/api/utils.cpp b/src/wallet/api/utils.cpp
index 788d98f25..c369427b4 100644
--- a/src/wallet/api/utils.cpp
+++ b/src/wallet/api/utils.cpp
@@ -39,8 +39,13 @@ namespace Monero {
namespace Utils {
bool isAddressLocal(const std::string &address)
-{
- return tools::is_local_address(address);
+{
+ try {
+ return tools::is_local_address(address);
+ } catch (const std::exception &e) {
+ MERROR("error: " << e.what());
+ return false;
+ }
}
}