File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 6
6
#include " util.h"
7
7
#include " init.h"
8
8
#include " rpcclient.h"
9
+ #include " rpcprotocol.h"
9
10
#include " ui_interface.h" /* for _(...) */
10
11
#include " chainparams.h"
11
12
@@ -55,23 +56,25 @@ int main(int argc, char* argv[])
55
56
try
56
57
{
57
58
if (!AppInitRPC (argc, argv))
58
- return 1 ;
59
+ return abs (RPC_MISC_ERROR) ;
59
60
}
60
61
catch (std::exception& e) {
61
62
PrintExceptionContinue (&e, " AppInitRPC()" );
63
+ return abs (RPC_MISC_ERROR);
62
64
} catch (...) {
63
65
PrintExceptionContinue (NULL , " AppInitRPC()" );
66
+ return abs (RPC_MISC_ERROR);
64
67
}
65
68
69
+ int ret = abs (RPC_MISC_ERROR);
66
70
try
67
71
{
68
- if (!CommandLineRPC (argc, argv))
69
- return 1 ;
72
+ ret = CommandLineRPC (argc, argv);
70
73
}
71
74
catch (std::exception& e) {
72
75
PrintExceptionContinue (&e, " CommandLineRPC()" );
73
76
} catch (...) {
74
77
PrintExceptionContinue (NULL , " CommandLineRPC()" );
75
78
}
76
- return 0 ;
79
+ return ret ;
77
80
}
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ int CommandLineRPC(int argc, char *argv[])
233
233
}
234
234
catch (std::exception& e) {
235
235
strPrint = string (" error: " ) + e.what ();
236
- nRet = 87 ;
236
+ nRet = abs (RPC_MISC_ERROR) ;
237
237
}
238
238
catch (...) {
239
239
PrintException (NULL , " CommandLineRPC()" );
You can’t perform that action at this time.
0 commit comments