flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

Custom message in furi_assert

Open polarikus opened this issue 2 years ago • 3 comments

Description of the feature you're suggesting.

Sometimes a custom message is missing infuri_assert(), It will be easier to catch where something went wrong in the application if you write custom messages when the assertion failed.

Is it possible to add something like this? #define furi_assertf(__e, message)
do {
if(!(__e)) {
furi_crash(message);
}
} while(0) #else

Anything else?

No response

polarikus avatar Mar 08 '23 17:03 polarikus

FYI: furi_assert/furi_crash doesn't preserve the message if it was called from a .fap -- since we are only storing a pointer to the message string, it'll be invalid after reboot.

hedger avatar Mar 10 '23 09:03 hedger

For better debugging experience, try using an SWD debugger - WiFi board, any ST-Link, or even a second Flipper.

hedger avatar Mar 10 '23 09:03 hedger

We'll think about it.

skotopes avatar Mar 13 '23 08:03 skotopes

fixed in #2819

skotopes avatar Jun 30 '23 09:06 skotopes