You are viewing a single comment's thread. Return to all comments →
I agree, the following implementation gives a timeout in C++ or C++14 but I'm pretty sure it's correct.
try { printf("%d\n", Server::compute(A,B)); } catch(bad_alloc&) { printf("Not enough memory\n"); } catch(exception& e) { printf("Exception: %s\n", e.what()); } catch(...) { printf("Other Exception\n"); }
Exceptional Server
You are viewing a single comment's thread. Return to all comments →
I agree, the following implementation gives a timeout in C++ or C++14 but I'm pretty sure it's correct.