mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-30 06:21:52 +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 -->
|
<!-- next-header -->
|
||||||
|
|
||||||
## [Unreleased] - ReleaseDate
|
## [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
|
### Added
|
||||||
- Support custom color themes for spantrace format
|
- Support custom color themes for spantrace format
|
||||||
|
|
||||||
<!-- next-url -->
|
<!-- 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]
|
[package]
|
||||||
name = "color-spantrace"
|
name = "color-spantrace"
|
||||||
version = "0.1.6-alpha.0"
|
version = "0.1.6"
|
||||||
authors = ["Jane Lusby <jlusby@yaah.dev>"]
|
authors = ["Jane Lusby <jlusby@yaah.dev>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
@ -26,6 +26,9 @@ ansi-parser = "0.6.5" # used for testing color schemes
|
|||||||
all-features = true
|
all-features = true
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
|
[package.metadata.release]
|
||||||
|
no-dev-version = true
|
||||||
|
|
||||||
[[package.metadata.release.pre-release-replacements]]
|
[[package.metadata.release.pre-release-replacements]]
|
||||||
file = "CHANGELOG.md"
|
file = "CHANGELOG.md"
|
||||||
search = "Unreleased"
|
search = "Unreleased"
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
//!
|
//!
|
||||||
//! [`tracing_error::SpanTrace`]: https://docs.rs/tracing-error/*/tracing_error/struct.SpanTrace.html
|
//! [`tracing_error::SpanTrace`]: https://docs.rs/tracing-error/*/tracing_error/struct.SpanTrace.html
|
||||||
//! [`color-backtrace`]: https://github.com/athre0z/color-backtrace
|
//! [`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(
|
#![warn(
|
||||||
missing_debug_implementations,
|
missing_debug_implementations,
|
||||||
missing_docs,
|
missing_docs,
|
||||||
@ -88,7 +88,7 @@ use owo_colors::{style, Style};
|
|||||||
use std::env;
|
use std::env;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::{BufRead, BufReader, ErrorKind};
|
use std::io::{BufRead, BufReader};
|
||||||
use tracing_error::SpanTrace;
|
use tracing_error::SpanTrace;
|
||||||
|
|
||||||
static THEME: OnceCell<Theme> = OnceCell::new();
|
static THEME: OnceCell<Theme> = OnceCell::new();
|
||||||
@ -315,8 +315,8 @@ impl Frame<'_> {
|
|||||||
|
|
||||||
let file = match File::open(filename) {
|
let file = match File::open(filename) {
|
||||||
Ok(file) => file,
|
Ok(file) => file,
|
||||||
Err(ref e) if e.kind() == ErrorKind::NotFound => return Ok(()),
|
// ignore io errors and just don't print the source
|
||||||
e @ Err(_) => e.unwrap(),
|
Err(_) => return Ok(()),
|
||||||
};
|
};
|
||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
@ -40,6 +40,7 @@ use tracing_error::SpanTrace;
|
|||||||
use tracing_subscriber::{prelude::*, registry::Registry};
|
use tracing_subscriber::{prelude::*, registry::Registry};
|
||||||
|
|
||||||
#[instrument]
|
#[instrument]
|
||||||
|
#[allow(clippy::clippy::if_same_then_else)]
|
||||||
fn test_capture(x: u8) -> SpanTrace {
|
fn test_capture(x: u8) -> SpanTrace {
|
||||||
if x == 42 {
|
if x == 42 {
|
||||||
SpanTrace::capture()
|
SpanTrace::capture()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user