Skip to content

Instantly share code, notes, and snippets.

View yaahc's full-sized avatar
💭
🦊

Jane Losare-Lusby yaahc

💭
🦊
  • Futurewei Technologies
  • San Francisco
  • X @yaahc_
View GitHub Profile
use backtrace::Backtrace;
use eyre::EyreHandler;
use std::error::Error;
use std::{fmt, iter};
fn main() -> eyre::Result<()> {
// Install our custom eyre report hook for constructing our custom Handlers
install().unwrap();
// construct a report with, hopefully, our custom handler!
use tracing_futures::Instrument;
pub struct FancyGuard<'a> {
span: &'a tracing::Span,
entered: bool,
}
impl<'a> FancyGuard<'a> {
pub fn new(span: &'a tracing::Span) -> FancyGuard<'a> {
span.with_subscriber(|(id, sub)| sub.enter(id)).unwrap();
@yaahc
yaahc / cc.error
Created July 13, 2020 21:12
cargo cc compiler error
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/depends/x86_64-unknown-linux-gnu/include" "-Wall" "-Wextra" "-o" "/home/jlusby/git/zfnd/zcashconsensus/target/debug/build/bitcoinconsensus-10d848f2845186e9/out/depend/zcash/src/script/zcashconsensus.o" "-c" "depend/zcash/src/script/zcashconsensus.cpp"
cargo:warning=In file included from /usr/include/x86_64-linux-gnu/sys/types.h:176,
cargo:warning= from /usr/include/stdlib.h:394,
cargo:warning= from /usr/include/c++/9/cstdlib:75,
cargo:warning= from /usr/include/c++/9/ext/string_conversions.h:41,
cargo:warning= from /usr/include/c++/9/bits/basic_string.h:6493,
cargo:warning= from /usr/include/c++/9/string:55,
cargo:warning= from /usr/include/c++/9/stdexcept:39,
cargo:warning= from depend/bitcoin/src/uint256.h:11,
cargo:warning= from
@yaahc
yaahc / charter.md
Created July 18, 2020 23:46
Error Handling Project Group Charter

Error Handling Project Group Charter

Motivation

The error handling project group aims to reduce confusion on how to structure error handling for users in the rust community. This will be accomplished by creating learning resources and pushing effort to upstream widely used crates into std. As a secondary goal this project group will also try to resolve some known issues with the Error trait and reporting errors in panics/termination.

Goals

agree on and define common error handling terminology