| 55 | return !frames_.empty(); |
| 56 | } |
| 57 | std::string StackTrace::ToString() const |
| 58 | { |
| 59 | std::ostringstream oss; |
| 60 | if (Resolved()) { |
| 61 | for (auto& f : GetFrames()) { |
| 62 | oss << " [" << f.index << "] " << f.description << "\n"; |
| 63 | if (f.line != 0 || !f.file.empty()) { |
| 64 | oss << " > " << f.file << '(' << f.line << ")\n"; |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | else { |
| 69 | oss << "\n !! UNRESOLVED STACK TRACE !!\n\n"; |
| 70 | } |
| 71 | return oss.str(); |
| 72 | } |
| 73 | std::unique_ptr<StackTrace> StackTrace::Here(size_t skip) |
| 74 | { |
| 75 | return std::make_unique<StackTrace>(std::stacktrace::current(skip)); |
no test coverage detected