{"id":13747323,"url":"https://github.com/yegor256/backtrace","last_synced_at":"2025-03-27T01:31:27.885Z","repository":{"id":62553918,"uuid":"152742764","full_name":"yegor256/backtrace","owner":"yegor256","description":"Ruby gem to print exception backtrace nicely","archived":false,"fork":false,"pushed_at":"2024-05-23T05:32:32.000Z","size":223,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-23T06:33:36.276Z","etag":null,"topics":["backtrace","exceptions","ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/backtrace","language":"Ruby","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/yegor256.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-12T11:48:00.000Z","updated_at":"2024-05-27T11:47:37.982Z","dependencies_parsed_at":"2023-01-22T16:15:28.564Z","dependency_job_id":"3f026e6b-8470-4d8f-8d90-95a487bc7b16","html_url":"https://github.com/yegor256/backtrace","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"ca290ba01fd74c2d328a94f84b3b56e66c867491"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fbacktrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fbacktrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fbacktrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fbacktrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/backtrace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245764715,"owners_count":20668466,"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","exceptions","ruby","ruby-gem"],"created_at":"2024-08-03T06:01:25.090Z","updated_at":"2025-03-27T01:31:27.872Z","avatar_url":"https://github.com/yegor256.png","language":"Ruby","readme":"\u003cimg src=\"/logo.svg\" width=\"64px\" height=\"64px\"/\u003e\n\n[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/backtrace)](http://www.rultor.com/p/yegor256/backtrace)\n[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)\n\n[![rake](https://github.com/yegor256/backtrace/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/backtrace/actions/workflows/rake.yml)\n[![Gem Version](https://badge.fury.io/rb/backtrace.svg)](http://badge.fury.io/rb/backtrace)\n[![Maintainability](https://api.codeclimate.com/v1/badges/0296baf81e86b90fba70/maintainability)](https://codeclimate.com/github/yegor256/backtrace/maintainability)\n[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/yegor256/backtrace/master/frames)\n[![Hits-of-Code](https://hitsofcode.com/github/yegor256/backtrace)](https://hitsofcode.com/view/github/yegor256/backtrace)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/backtrace/blob/master/LICENSE.txt)\n\nA Ruby backtrace nicely printed.\n\nFirst, install it:\n\n```bash\n$ gem install backtrace\n```\n\nThen, use it like this, to print a backtrace:\n\n```ruby\nrequire 'backtrace'\nbegin\n  # do something dangerous\nrescue StandardError =\u003e e\n  puts Backtrace.new(e)\nend\n```\n\n![screenshot](https://raw.githubusercontent.com/yegor256/backtrace/master/screenshot.png)\n\nA more compact version would use a block:\n\n```ruby\nrequire 'backtrace'\nBacktrace.exec(swallow: true) do\n  # do something dangerous\nend\n```\n\nYou can also provide a logging facility, to log the backtrace:\n\n```ruby\nrequire 'backtrace'\nlog = Log.new # it must implement method error(msg)\nBacktrace.exec(swallow: true, log: log) do\n  # do something dangerous\nend\n```\n\nSometimes you may need to hide unimportant lines of the backtrace,\nwhich are not related to your code base. You can use `mine` argument\nof the constructor, which is a regular expression or a string. When it's met\nin the backtrace, the printing will stop:\n\n```ruby\nrequire 'backtrace'\nbegin\n  # do something dangerous\nrescue StandardError =\u003e e\n  puts Backtrace.new(e, mine: 'yegor')\nend\n```\n\nThat's it.\n\n## How to contribute\n\nRead [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nMake sure your build is green before you contribute\nyour pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and\n[Bundler](https://bundler.io/) installed. Then:\n\n```\n$ bundle update\n$ bundle exec rake\n```\n\nIf it's clean and you don't see any error messages, submit your pull request.\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fbacktrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2Fbacktrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fbacktrace/lists"}