Skip to content

Make fail message more presentable #15239

Closed
@SiegeLord

Description

@SiegeLord

Given this code,

fn main()
{
    fail!("This is why you fail.")
}

the failure message looks like this

task '<main>' failed at 'This is why you fail.', test.rs:3

This is problematic as the useful information (the message passed to fail!)is buried inside the sentence. It'd be better if the failure message was on its own line, something akin to:

task '<main>' failed at test.rs:3, saying:

This is why you fail.

This format also allows for space to mention other useful information (e.g. issue #11704).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions