MCPcopy Create free account
hub / github.com/boostorg/stacktrace / main

Function main

example/throwing_st.cpp:62–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61#include <iostream>
62int main() {
63
64 //[getting_started_catching_trace
65 try {
66 foo(5); // testing assert handler
67 } catch (const std::exception& e) {
68 std::cerr << e.what() << '\n';
69 const boost::stacktrace::stacktrace* st = boost::get_error_info<traced>(e);
70 if (st) {
71 std::cerr << *st << '\n'; /*<-*/ return 0; /*->*/
72 } /*<-*/ return 3; /*->*/
73 }
74 //]
75
76 return 5;
77}
78

Callers

nothing calls this directly

Calls 1

fooFunction · 0.70

Tested by

no test coverage detected