Skip to content

Arrow direction in pretty-printed stacks #8560

Description

@fjarri

Related Problem

I looked through issues in case there was already a discussion about it, but didn't manage to find anything - please point me to it if there was one.

Currently, the printed report looks something like this

external error
├╴at src/main.rs:29:20
│
├─▶ intermediate error
│   ╰╴at src/main.rs:21:21
│
╰─▶ internal error
    ╰╴at src/main.rs:13:23

This seems a bit confusing from the design perspective - it implies that there is some data flow going on from the external error to internal ones.

Proposed Solution

I wonder, wouldn't it be more intuitive if it looked something like this:

external error
╰╴at src/main.rs:29:20
▲
└── intermediate error
┌─▶ ╰╴at src/main.rs:21:21
│
╰── internal error
    ╰╴at src/main.rs:13:23

or this:

external error
╰╴at src/main.rs:29:20
▲
└── intermediate error
▲   ╰╴at src/main.rs:21:21
│
╰── internal error
    ╰╴at src/main.rs:13:23

Alternatives

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/libsRelates to first-party libraries/crates/packages (area)area/libs > error-stackAffects the `error-stack` crate (library)category/enhancementNew feature or requestlang/rustPull requests that update Rust code

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions