MCPcopy Create free account
hub / github.com/ShivaBhattacharjee/KeyZen / main

Function main

data/cpp/06_error_handling.cpp:24–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24int main() {
25 try {
26 std::cout << safe_divide(10, 2) << "\n";
27 std::cout << safe_divide(10, 0) << "\n";
28 } catch (const std::invalid_argument& e) {
29 std::cerr << "error: " << e.what() << "\n";
30 }
31 return 0;
32}

Callers

nothing calls this directly

Calls 1

safe_divideFunction · 0.70

Tested by

no test coverage detected