mirror of
https://github.com/boostorg/stacktrace.git
synced 2026-01-19 04:42:12 +00:00
19 lines
494 B
C++
19 lines
494 B
C++
// Copyright 2019 Peter Dimov
|
|
// Copyright Antony Polukhin, 2025-2026
|
|
//
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
|
|
#include <boost/stacktrace/stacktrace.hpp>
|
|
#include <iostream>
|
|
|
|
int main()
|
|
{
|
|
std::cout << boost::stacktrace::stacktrace() << std::endl;
|
|
try {
|
|
throw 42;
|
|
} catch (...) {
|
|
std::cout << "From current excption:\n" << boost::stacktrace::stacktrace::from_current_exception() << std::endl;
|
|
}
|
|
}
|