Closed vipcxj closed 5 months ago
Hi, a raw_trace is just a struct with a vector so you can create an empty raw trace with cpptrace::raw_trace{}
. It's safe to call any member function on this empty raw trace. By default cpptrace::raw_trace{}.resolve().print()
will just print
Stack trace (most recent call first):
<empty trace>
I'll close for now, please let me know if there's anything else I can help with or if you think the current system could be improved!
I want to create a custom exception suport with/without trace which decide by user. Maybe I can pass an empty raw_trace to do this. But I don't know how to construct an empty raw_trace and make sure that I don't call the relevant methods of raw_trace afterward, resulting in bugs