flipperzero-firmware
flipperzero-firmware copied to clipboard
Custom message in furi_assert
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
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.
For better debugging experience, try using an SWD debugger - WiFi board, any ST-Link, or even a second Flipper.
We'll think about it.
fixed in #2819