{"id":15574311,"url":"https://github.com/gpmueller/trace","last_synced_at":"2025-07-01T08:07:50.165Z","repository":{"id":42471155,"uuid":"228222267","full_name":"GPMueller/trace","owner":"GPMueller","description":"An exception backtracing library","archived":false,"fork":false,"pushed_at":"2022-04-04T10:48:11.000Z","size":147,"stargazers_count":11,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T02:42:02.076Z","etag":null,"topics":["backtrace","cpp17","exceptions"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GPMueller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-15T17:20:02.000Z","updated_at":"2024-07-04T11:33:47.000Z","dependencies_parsed_at":"2022-09-13T15:01:55.963Z","dependency_job_id":null,"html_url":"https://github.com/GPMueller/trace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GPMueller/trace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Ftrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Ftrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Ftrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Ftrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GPMueller","download_url":"https://codeload.github.com/GPMueller/trace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Ftrace/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260438854,"owners_count":23009268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backtrace","cpp17","exceptions"],"created_at":"2024-10-02T18:16:31.907Z","updated_at":"2025-06-17T20:36:44.840Z","avatar_url":"https://github.com/GPMueller.png","language":"C++","readme":"trace - portable exception backtracing in C++17\n====================================================================\n\n[![CI](https://github.com/GPMueller/trace/workflows/CI/badge.svg)](https://github.com/GPMueller/trace/actions)\n[![Coverage](https://codecov.io/gh/GPMueller/trace/branch/master/graph/badge.svg)](https://codecov.io/gh/GPMueller/trace)\n\nThis library uses\n[`std::nested_exception`](http://en.cppreference.com/w/cpp/error/nested_exception)\nand\n[`std::throw_with_nested`](http://en.cppreference.com/w/cpp/error/throw_with_nested)\nand can be applied in order to not lose information while propagating an original\n[`std::exception`](https://en.cppreference.com/w/cpp/error/exception)\nupwards through a chain of function calls and create a **backtrace** without any\noverhead (compare e.g. logging of debug messages). This avoids much of the need for any\ndebugging and provides a way of ensuring that a library does not crash ungracefully.\n\nUsage\n--------------------------------------------------------------------\n\n```C++\n#include \u003ctrace/trace.hpp\u003e\n```\n\nThe library revolves around three macros\n- `trace::initiate`: can be placed anywhere. Takes a `std::string message` and initiates\n  a trace with information about the corresponding function and source file. This is done\n  by throwing an exception.\n- `trace::propagate`: should be placed in a catch-block. Takes a `std::string message`,\n  attaches it to the trace and propagates the trace up the function call stack by\n  rethrowing a nested exception\n- `trace::handle`: should be placed in a catch-block. Takes a `std::exception \u0026` and\n  unwraps it to creates a backtrace\n\nand the function `trace::latest()`, which returns the most recent backtrace, created by\nthe call to `handle`.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpmueller%2Ftrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpmueller%2Ftrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpmueller%2Ftrace/lists"}