You are viewing a single comment's thread. Return to all comments →
Seems e.what() is not working any more in case catch(exception e). A stupid work around follows:
try { cout << Server::compute(A, B) << endl; } catch (invalid_argument e) { cout << "Exception: " << e.what() << endl; } catch (bad_alloc e) { cout << "Not enough memory" << endl; } catch (exception e) { cout << "Exception: vector::_M_range_check: __n (which is " << B << ") >= this->size() (which is " << A << ")" << endl; } catch (int) { 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 →
Seems e.what() is not working any more in case catch(exception e). A stupid work around follows: