mirror of
https://gitea.invidious.io/iv-org/shard-backtracer.cr.git
synced 2024-08-15 00:53:13 +00:00
Update README
This commit is contained in:
parent
6a5100dc61
commit
4f085e1f1e
1 changed files with 30 additions and 8 deletions
38
README.md
38
README.md
|
@ -1,6 +1,6 @@
|
|||
# backtracer.cr
|
||||
# backtracer.cr [](https://travis-ci.com/Sija/backtracer.cr) [](https://github.com/Sija/backtracer.cr/releases) [](https://github.com/Sija/backtracer.cr/blob/master/LICENSE)
|
||||
|
||||
TODO: Write a description here
|
||||
Crystal shard aiming to assist with parsing backtraces into a structured form.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -18,14 +18,36 @@ TODO: Write a description here
|
|||
|
||||
```crystal
|
||||
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
|
||||
```
|
||||
|
||||
TODO: Write usage instructions here
|
||||
|
||||
## Development
|
||||
|
||||
TODO: Write development instructions here
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Fork it (<https://github.com/Sija/backtracer.cr/fork>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue