|
|
|
|
|
by Gibbon1
1379 days ago
|
|
Things I tend to do in my firmware for errors. Record the error line number where the error happened.
Use __builtin_return_address(0) to fink on the caller. Idle thoughts. Despite it's provenience BASIC's on error goto has merit. The problem with try/catch is creating scoped blocks of code that's annoying. try
{
// scoped stuff
}
catch
{
}
vs on_error_goto label;
// stuff
label:
Also a thought is having a separate error_return keyword. And the ability to mark functions with 'no error' |
|