You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Hi @LaurentLouf , Thanks for your suggestion. I have analyzed your request and I think, as print_error_report() report is specifically written for Mbed-OS error handling+error coding, exposing it outside will open up opportunities to bypass the overall error handing APIs provided by Mbed-OS which is not expected. What I suggest is if you want to capture specific error scenarios, define custom error codes in mbed_error.h. For now, Im closing this as no action is required.
Also with upcoming Mbed-OS release 5.12 happening in next few weeks we will introducing the Crash-reporting feature which will capture the error scenario in RAM and warm-reset the system which you are currently doing with internal flash - See https://github.com/ARMmbed/mbed-os/blob/master/docs/design-documents/platform/crash-reporting/crash_reporting.md for more info on that. Its already part of master branch though.
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 byprint_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
The text was updated successfully, but these errors were encountered: