File tree 4 files changed +19
-7
lines changed
4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(GetTransaction) {
109
109
try {
110
110
response = fx.btc .gettransaction (txid, false );
111
111
} catch (BitcoinException& e) {
112
- BOOST_REQUIRE (e.getCode () == -5 );
112
+ BOOST_REQUIRE_MESSAGE (e.getCode () == -5 , " Error( " << e. getCode () << " ): " << e. getMessage () );
113
113
return ;
114
114
}
115
115
@@ -374,7 +374,11 @@ BOOST_AUTO_TEST_CASE(GetTxOutSetInfo) {
374
374
375
375
utxosetinfo_t response;
376
376
377
- BOOST_REQUIRE_NO_THROW (response = fx.btc .gettxoutsetinfo ());
377
+ try {
378
+ response = fx.btc .gettxoutsetinfo ();
379
+ } catch (BitcoinException& e) {
380
+ BOOST_REQUIRE_MESSAGE (false , " Error(" << e.getCode () << " ): " << e.getMessage ());
381
+ }
378
382
379
383
#ifdef VERBOSE
380
384
std::cout << " === gettxoutsetinfo ===" << std::endl;
Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ BOOST_AUTO_TEST_CASE(GetAddedNodeInfo) {
33
33
MyFixture fx;
34
34
35
35
std::vector<nodeinfo_t > response;
36
- BOOST_REQUIRE_NO_THROW (response = fx.btc .getaddednodeinfo (true , " 127.0.0.255" ));
36
+ try {
37
+ response = fx.btc .getaddednodeinfo (true , " 127.0.0.255" );
38
+ } catch (BitcoinException& e) {
39
+ BOOST_REQUIRE_MESSAGE (false , " Error(" << e.getCode () << " ): " << e.getMessage ());
40
+ }
37
41
38
42
#ifdef VERBOSE
39
43
std::cout << " === getaddednodeinfo ===" << std::endl;
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ BOOST_AUTO_TEST_CASE(SendRawTransaction) {
135
135
try {
136
136
fx.btc .sendrawtransaction (txid, false );
137
137
}catch (BitcoinException& e){
138
- BOOST_REQUIRE (e.getCode () == -25 || e.getCode () == -27 );
138
+ BOOST_REQUIRE_MESSAGE (e.getCode () == -25 || e.getCode () == -27 , " Error( " << e. getCode () << " ): " << e. getMessage () );
139
139
}
140
140
}
141
141
Original file line number Diff line number Diff line change @@ -44,8 +44,7 @@ BOOST_AUTO_TEST_CASE(EncryptWallet) {
44
44
try {
45
45
fx.btc .encryptwallet (" 123456" );
46
46
} catch (BitcoinException& e) {
47
- BOOST_REQUIRE (e.getCode () == -15 );
48
- BOOST_WARN_MESSAGE (false , e.getMessage ());
47
+ BOOST_REQUIRE_MESSAGE (false , " Error(" << e.getCode () << " ): " << e.getMessage ());
49
48
}
50
49
51
50
}
@@ -235,7 +234,12 @@ BOOST_AUTO_TEST_CASE(SetTxFee) {
235
234
bool response;
236
235
double getinfofee;
237
236
238
- BOOST_REQUIRE_NO_THROW (response = fx.btc .settxfee (0.0002 ));
237
+ try {
238
+ response = fx.btc .settxfee (0.0002 );
239
+ } catch (BitcoinException& e) {
240
+ BOOST_REQUIRE_MESSAGE (false , " Error(" << e.getCode () << " ): " << e.getMessage ());
241
+ }
242
+
239
243
BOOST_REQUIRE (response == true );
240
244
241
245
BOOST_REQUIRE_NO_THROW (getinfofee = fx.btc .getinfo ().paytxfee );
You can’t perform that action at this time.
0 commit comments