Exceptional Server

  • + 1 comment

    try { int res = Server::compute(A, B); if((A % B) == A) out_of_range("Accessing out of range"); } catch(bad_alloc& e) { cout << "Not enough memory " << endl; } catch(exception& e) { cout << "Exception: " << e.what() << endl; } catch(...) { cout << "Other Exceptions " << endl; }

    }
    cout << Server::getLoad() << endl;