Skip to content

Make print_error_report available outside of mbed_error.c #8471

Closed
@LaurentLouf

Description

@LaurentLouf

Description

I don't think this is linked to any target in particular, but it would be nice to define print_error_report as a normal function instead of a static function, to be able to use it anywhere in the code. I don't know how common this may be, but one possible use case is the following : I implement a custom error handling code, where I save errors (the error context to be precise) in the internal flash of the target or on any storage and restart the system instead of halting it. When booting next time, I will inspect the storage to see if any error occurred and it would be nice to have the same formatting than the formatting used by print_error_report for consistency, so it would be nice if this function was available everywhere. Some info may be garbage, but most of it should be pretty useful.

Issue request type

[ ] Question
[x] Enhancement
[ ] Bug

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