We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74f9152 commit 2e35fefCopy full SHA for 2e35fef
README.md
@@ -47,11 +47,17 @@ int main()
47
std::string address = "127.0.0.1";
48
int port = 8332;
49
50
- /* Constructor to connect to the bitcoin daemon */
51
- BitcoinAPI btc(username, password, address, port);
52
-
53
- /* Example method - getbalance */
54
- std::cout << "Wallet balance: " << btc.getbalance() << std::endl;
+ try
+ {
+ /* Constructor to connect to the bitcoin daemon */
+ BitcoinAPI btc(username, password, address, port);
+
55
+ /* Example method - getbalance */
56
+ std::cout << "Wallet balance: " << btc.getbalance() << std::endl;
57
+ }catch(BitcoinException e)
58
59
+ std::cerr << e.getMessage() << std::endl;
60
+ }
61
}
62
```
63
0 commit comments