client/main(): Better handling of exceptions

- Catch std::exception by reference
- Return EXIT_FAILURE if exception was caught by main()