{"id":19022843,"url":"https://github.com/llvm-swift/prettystacktrace","last_synced_at":"2025-04-23T08:26:44.013Z","repository":{"id":63916692,"uuid":"117170778","full_name":"llvm-swift/PrettyStackTrace","owner":"llvm-swift","description":"A Swift library for printing a breadcrumb trace on a fatal signal.","archived":false,"fork":false,"pushed_at":"2019-06-26T21:02:24.000Z","size":23,"stargazers_count":45,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T22:39:45.882Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/llvm-swift.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":"2018-01-12T00:31:22.000Z","updated_at":"2022-02-06T15:06:45.000Z","dependencies_parsed_at":"2023-01-14T13:45:17.401Z","dependency_job_id":null,"html_url":"https://github.com/llvm-swift/PrettyStackTrace","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llvm-swift%2FPrettyStackTrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llvm-swift%2FPrettyStackTrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llvm-swift%2FPrettyStackTrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llvm-swift%2FPrettyStackTrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llvm-swift","download_url":"https://codeload.github.com/llvm-swift/PrettyStackTrace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250397716,"owners_count":21423857,"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":[],"created_at":"2024-11-08T20:27:53.240Z","updated_at":"2025-04-23T08:26:43.995Z","avatar_url":"https://github.com/llvm-swift.png","language":"Swift","readme":"# PrettyStackTrace\n\nPrettyStackTrace allows Swift command-line programs to print a trace of\nexecution behaviors when a terminating signal is raised, such as a fatal error.\n\nTo use it, wrap your actions in a call to `trace(_:)`. This will\nregister an entry in the stack trace and (if your process fatal errors) will\nprint breadcrumbs to stderr describing what was going on when you crashed.\n\n## Installation\n\nPrettyStackTrace is available from the Swift package manager. Add\n\n```swift\n.package(url: \"https://github.com/llvm-swift/PrettyStackTrace.git\", from: \"0.0.1\")\n```\n\nto your Package.swift file to use it.\n\n\n## Example\n\n```swift\ntrace(\"doing first task\") {\n  print(\"I'm doing the first task!\")\n  trace(\"doing second task\") {\n    print(\"I'm doing the second task!\")\n    fatalError(\"error on second task!\")\n  }\n}\n```\n\nThis will output:\n\n```\nI'm doing the first task!\nI'm doing the second task!\nFatal error: error on second task\nStack dump:\n-\u003e While doing second task (func main(), in file file.swift, on line 3)\n-\u003e While doing first task (func main(), in file file.swift, on line 1)\n```\n\n## Authors\n\nHarlan Haskins ([@harlanhaskins](https://github.com/harlanhaskins))\n\nRobert Widmann ([@CodaFi](https://github.com/CodaFi))\n\n## License\n\nPrettyStackTrace is released under the MIT license, a copy of which is available\nin this repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllvm-swift%2Fprettystacktrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllvm-swift%2Fprettystacktrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllvm-swift%2Fprettystacktrace/lists"}