No description
Find a file
Sijawusz Pur Rahnama b4d0390bcd
Merge pull request #1 from Sija/bump-ameba
Bump ameba to ~> 1.5.0
2023-10-11 04:14:50 +02:00
.github/workflows Migrate from Travis CI to GitHub Actions 2021-03-10 15:45:11 +01:00
spec Bump ameba dependency and fix found issues 2023-03-06 05:58:15 +01:00
src Bump ameba dependency and fix found issues 2023-03-06 05:58:15 +01:00
.ameba.yml Bump ameba dependency and fix found issues 2023-03-06 05:58:15 +01:00
.editorconfig Initial commit 2020-12-27 21:11:03 +01:00
.gitignore Initial commit 2020-12-27 21:11:03 +01:00
LICENSE Initial commit 2020-12-27 21:11:03 +01:00
README.md Migrate from Travis CI to GitHub Actions 2021-03-10 15:45:11 +01:00
shard.yml Bump ameba to ~> 1.5.0 2023-10-11 04:10:23 +02:00

backtracer.cr CI Releases License

Crystal shard aiming to assist with parsing backtraces into a structured form.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      backtracer:
        github: Sija/backtracer.cr
    
  2. Run shards install

Usage

require "backtracer"

def foo
  raise "bang!"
end

def bar
  foo
end

def baz
  bar
end

begin
  baz
rescue ex
  backtrace = Backtracer.parse(ex.backtrace)

  # Prints
  #
  # `foo` at foo.cr:4:3
  # `bar` at foo.cr:8:3
  # `baz` at foo.cr:12:3
  # ...
  backtrace.frames.each do |frame|
    puts frame
  end
end

Contributing

  1. Fork it (https://github.com/Sija/backtracer.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • @Sija Sijawusz Pur Rahnama - creator and maintainer