Add custom backtrace printer that excludes frames outside of user's code - #53
Merged
Merged
Conversation
spacekookie
requested changes
Nov 8, 2018
| .enumerate() | ||
| { | ||
| let ip = frame.ip(); | ||
| let _ = write!(backtrace, "\n{:4}: {:2$?}", idx, ip, HEX_WIDTH); |
Collaborator
There was a problem hiding this comment.
More of a question but: what happens if write! fails? I guess there's an Err(...) that we just never check?
While we don't ever want to panic, it might be a nicer approach to move this whole code to a function that can return a Result<...>, then just using ? liberally to make sure that no badly formatted stacktraces are written.
Contributor
Author
There was a problem hiding this comment.
There is no possibility for it to fail for String
Contributor
Author
|
Comments are addressed |
spacekookie
approved these changes
Mar 25, 2019
spacekookie
left a comment
Collaborator
There was a problem hiding this comment.
Hey there, sorry for leaving this PR open for so long. Must have fallen off the radar. LGTM now
epage
added a commit
that referenced
this pull request
Sep 12, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [EmbarkStudios/cargo-deny-action](https://redirect.github.com/EmbarkStudios/cargo-deny-action) | action | pinDigest | → `3fd3802` | | [Swatinem/rust-cache](https://redirect.github.com/Swatinem/rust-cache) | action | pinDigest | → `e18b497` | | [actions-rs/audit-check](https://redirect.github.com/actions-rs/audit-check) | action | pinDigest | → `35b7b53` | | [actions/checkout](https://redirect.github.com/actions/checkout) | action | pinDigest | → `de0fac2` | | [coverallsapp/github-action](https://redirect.github.com/coverallsapp/github-action) | action | pinDigest | → `09b709c` | | [crate-ci/committed](https://redirect.github.com/crate-ci/committed) | action | pinDigest | → `4cd58ed` | | [crate-ci/typos](https://redirect.github.com/crate-ci/typos) | action | pinDigest | → `8f11c0d` | | [dtolnay/rust-toolchain](https://redirect.github.com/dtolnay/rust-toolchain) | action | pinDigest | → `29eef33` | | [github/codeql-action](https://redirect.github.com/github/codeql-action) | action | pinDigest | → `c10b806` | | [j178/prek-action](https://redirect.github.com/j178/prek-action) | action | pinDigest | → `0bb87d7` | | [taiki-e/install-action](https://redirect.github.com/taiki-e/install-action) | action | pinDigest | → `4448ce4` | --- ### Configuration 📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/epage/_rust). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My45NC4xIiwidXBkYXRlZEluVmVyIjoiNDMuOTQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #52
Checklist
Example of from
tests/repo with debug symbols https://gist.github.com/DoumanAsh/4b1da5519a86df101e3a4f88f7e4d812Let me know if changes to format needed, then I'll update examples in README.md