|
|
@ -86,7 +86,7 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany( |
|
|
|
isfromzaddr_ = true; |
|
|
|
frompaymentaddress_ = addr; |
|
|
|
spendingkey_ = key; |
|
|
|
} catch (std::runtime_error e) { |
|
|
|
} catch (const std::runtime_error& e) { |
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("runtime error: ") + e.what()); |
|
|
|
} |
|
|
|
} |
|
|
@ -106,17 +106,20 @@ void AsyncRPCOperation_sendmany::main() { |
|
|
|
|
|
|
|
try { |
|
|
|
success = main_impl(); |
|
|
|
} catch (Object objError) { |
|
|
|
} catch (const Object& objError) { |
|
|
|
int code = find_value(objError, "code").get_int(); |
|
|
|
std::string message = find_value(objError, "message").get_str(); |
|
|
|
set_error_code(code); |
|
|
|
set_error_message(message); |
|
|
|
} catch (runtime_error e) { |
|
|
|
} catch (const runtime_error& e) { |
|
|
|
set_error_code(-1); |
|
|
|
set_error_message("runtime error: " + string(e.what())); |
|
|
|
} catch (logic_error e) { |
|
|
|
} catch (const logic_error& e) { |
|
|
|
set_error_code(-1); |
|
|
|
set_error_message("logic error: " + string(e.what())); |
|
|
|
} catch (const exception& e) { |
|
|
|
set_error_code(-1); |
|
|
|
set_error_message("general exception: " + string(e.what())); |
|
|
|
} catch (...) { |
|
|
|
set_error_code(-2); |
|
|
|
set_error_message("unknown error"); |
|
|
@ -577,7 +580,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { |
|
|
|
FormatMoney(plaintext.value, false) |
|
|
|
); |
|
|
|
|
|
|
|
} catch (const std::exception e) { |
|
|
|
} catch (const std::exception& e) { |
|
|
|
throw JSONRPCError(RPC_WALLET_ERROR, strprintf("Error decrypting output note of previous JoinSplit: %s", e.what())); |
|
|
|
} |
|
|
|
} |
|
|
|