For example:
#define SUCCESS 1u
status_t status;
/* Initialize a peripheral */
status = start_Timer();
if(status == SUCCESS)
{
/* Proceed */
status = another_initialization();
if(status == SUCCESS)
{
/* Proceed further */
}
}
This gets a lot of indentation in a few consecutive procedures which leaves a really small line-width for the actual algorithms in the program. Is there any alternative to exception handling in C?