|
|
@ -6,6 +6,7 @@ |
|
|
|
#include "util.h" |
|
|
|
#include "util.h" |
|
|
|
#include "init.h" |
|
|
|
#include "init.h" |
|
|
|
#include "rpcclient.h" |
|
|
|
#include "rpcclient.h" |
|
|
|
|
|
|
|
#include "rpcprotocol.h" |
|
|
|
#include "ui_interface.h" /* for _(...) */ |
|
|
|
#include "ui_interface.h" /* for _(...) */ |
|
|
|
#include "chainparams.h" |
|
|
|
#include "chainparams.h" |
|
|
|
|
|
|
|
|
|
|
@ -55,23 +56,25 @@ int main(int argc, char* argv[]) |
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(!AppInitRPC(argc, argv)) |
|
|
|
if(!AppInitRPC(argc, argv)) |
|
|
|
return 1; |
|
|
|
return abs(RPC_MISC_ERROR); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (std::exception& e) { |
|
|
|
catch (std::exception& e) { |
|
|
|
PrintExceptionContinue(&e, "AppInitRPC()"); |
|
|
|
PrintExceptionContinue(&e, "AppInitRPC()"); |
|
|
|
|
|
|
|
return abs(RPC_MISC_ERROR); |
|
|
|
} catch (...) { |
|
|
|
} catch (...) { |
|
|
|
PrintExceptionContinue(NULL, "AppInitRPC()"); |
|
|
|
PrintExceptionContinue(NULL, "AppInitRPC()"); |
|
|
|
|
|
|
|
return abs(RPC_MISC_ERROR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int ret = abs(RPC_MISC_ERROR); |
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(!CommandLineRPC(argc, argv)) |
|
|
|
ret = CommandLineRPC(argc, argv); |
|
|
|
return 1; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (std::exception& e) { |
|
|
|
catch (std::exception& e) { |
|
|
|
PrintExceptionContinue(&e, "CommandLineRPC()"); |
|
|
|
PrintExceptionContinue(&e, "CommandLineRPC()"); |
|
|
|
} catch (...) { |
|
|
|
} catch (...) { |
|
|
|
PrintExceptionContinue(NULL, "CommandLineRPC()"); |
|
|
|
PrintExceptionContinue(NULL, "CommandLineRPC()"); |
|
|
|
} |
|
|
|
} |
|
|
|
return 0; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|