ReFRACtor
test_backtrace.cpp
Go to the documentation of this file.
1 #include <boost/backtrace.hpp>
2 #include <iostream>
3 
4 int foo()
5 {
6  throw boost::runtime_error("My Error");
7  return 10;
8 }
9 
10 int bar()
11 {
12  return foo()+20;
13 }
14 
15 
16 int main()
17 {
18  try {
19  std::cout << bar() << std::endl;
20  }
21  catch(std::exception const &e)
22  {
23  std::cerr << e.what() << std::endl;
24  std::cerr << boost::trace(e);
25  }
26 }
int main()
int foo()
details::trace_manip trace(E const &e)
Definition: backtrace.hpp:184
int bar()

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:11