| 317 | } |
| 318 | |
| 319 | int main(int argc, char* argv[]) |
| 320 | { |
| 321 | SetupEnvironment(); |
| 322 | if (!SetupNetworking()) { |
| 323 | fprintf(stderr, "Error: Initializing networking failed\n"); |
| 324 | exit(1); |
| 325 | } |
| 326 | |
| 327 | try { |
| 328 | if(!AppInitRPC(argc, argv)) |
| 329 | return EXIT_FAILURE; |
| 330 | } |
| 331 | catch (const std::exception& e) { |
| 332 | PrintExceptionContinue(&e, "AppInitRPC()"); |
| 333 | return EXIT_FAILURE; |
| 334 | } catch (...) { |
| 335 | PrintExceptionContinue(NULL, "AppInitRPC()"); |
| 336 | return EXIT_FAILURE; |
| 337 | } |
| 338 | |
| 339 | int ret = EXIT_FAILURE; |
| 340 | try { |
| 341 | ret = CommandLineRPC(argc, argv); |
| 342 | } |
| 343 | catch (const std::exception& e) { |
| 344 | PrintExceptionContinue(&e, "CommandLineRPC()"); |
| 345 | } catch (...) { |
| 346 | PrintExceptionContinue(NULL, "CommandLineRPC()"); |
| 347 | } |
| 348 | return ret; |
| 349 | } |
nothing calls this directly
no test coverage detected