You are viewing a single comment's thread. Return to all comments →
Need to make different catch for invalid argument and other exceptions
try{ cout << Server::compute(A,B) << endl; } catch(invalid_argument &err){ cout << "Exception: " << err.what() << endl; } catch(bad_alloc &err){ cout << "Not enough memory" << endl; } catch(exception &err){ cout << "Exception: " << err.what() << endl; } catch(...){ cout << "Other Exception" << endl; }
Seems like cookies are disabled on this browser, please enable them to open this website
Exceptional Server
You are viewing a single comment's thread. Return to all comments →
Need to make different catch for invalid argument and other exceptions