mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-27 13:01:29 +00:00
ignore all io errors while resolving source files (#12)
* ignore all io errors while resolving source files * prep for release
This commit is contained in:
commit
f7e61e648f
11
CHANGELOG.md
11
CHANGELOG.md
@ -7,8 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<!-- next-header -->
|
||||
|
||||
## [Unreleased] - ReleaseDate
|
||||
|
||||
## [0.1.6] - 2020-12-02
|
||||
### Fixed
|
||||
- Ignore all io errors when resolving source files instead of only file not
|
||||
found errors
|
||||
|
||||
## [v0.1.5] - 2020-12-01
|
||||
### Added
|
||||
- Support custom color themes for spantrace format
|
||||
|
||||
<!-- next-url -->
|
||||
[Unreleased]: https://github.com/yaahc/color-spantrace/releases/tag/v0.1.5
|
||||
[Unreleased]: https://github.com/yaahc/color-spantrace/compare/v0.1.6...HEAD
|
||||
[0.1.6]: https://github.com/yaahc/color-spantrace/compare/v0.1.5...v0.1.6
|
||||
[v0.1.5]: https://github.com/yaahc/color-spantrace/releases/tag/v0.1.5
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "color-spantrace"
|
||||
version = "0.1.6-alpha.0"
|
||||
version = "0.1.6"
|
||||
authors = ["Jane Lusby <jlusby@yaah.dev>"]
|
||||
edition = "2018"
|
||||
license = "MIT OR Apache-2.0"
|
||||
@ -26,6 +26,9 @@ ansi-parser = "0.6.5" # used for testing color schemes
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[package.metadata.release]
|
||||
no-dev-version = true
|
||||
|
||||
[[package.metadata.release.pre-release-replacements]]
|
||||
file = "CHANGELOG.md"
|
||||
search = "Unreleased"
|
||||
|
@ -59,7 +59,7 @@
|
||||
//!
|
||||
//! [`tracing_error::SpanTrace`]: https://docs.rs/tracing-error/*/tracing_error/struct.SpanTrace.html
|
||||
//! [`color-backtrace`]: https://github.com/athre0z/color-backtrace
|
||||
#![doc(html_root_url = "https://docs.rs/color-spantrace/0.1.4")]
|
||||
#![doc(html_root_url = "https://docs.rs/color-spantrace/0.1.6")]
|
||||
#![warn(
|
||||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
@ -88,7 +88,7 @@ use owo_colors::{style, Style};
|
||||
use std::env;
|
||||
use std::fmt;
|
||||
use std::fs::File;
|
||||
use std::io::{BufRead, BufReader, ErrorKind};
|
||||
use std::io::{BufRead, BufReader};
|
||||
use tracing_error::SpanTrace;
|
||||
|
||||
static THEME: OnceCell<Theme> = OnceCell::new();
|
||||
@ -315,8 +315,8 @@ impl Frame<'_> {
|
||||
|
||||
let file = match File::open(filename) {
|
||||
Ok(file) => file,
|
||||
Err(ref e) if e.kind() == ErrorKind::NotFound => return Ok(()),
|
||||
e @ Err(_) => e.unwrap(),
|
||||
// ignore io errors and just don't print the source
|
||||
Err(_) => return Ok(()),
|
||||
};
|
||||
|
||||
use std::fmt::Write;
|
||||
|
@ -40,6 +40,7 @@ use tracing_error::SpanTrace;
|
||||
use tracing_subscriber::{prelude::*, registry::Registry};
|
||||
|
||||
#[instrument]
|
||||
#[allow(clippy::clippy::if_same_then_else)]
|
||||
fn test_capture(x: u8) -> SpanTrace {
|
||||
if x == 42 {
|
||||
SpanTrace::capture()
|
||||
|
Loading…
x
Reference in New Issue
Block a user