The code above is set when initializing the context, and it checks whether FLAG_RENDER_DEBUG is set in $flags and if so assigns it to $context['flags']['debug'].
And then upon rendering, if lightncandy encounters an error, it checks wether $context['flags']['debug'] is set to DEBUG_ERROR_LOG or DEBUG_ERROR_EXCEPTION, and if so it either logs or throws an exception (respectively):
https://github.com/zordius/lightncandy/blob/f962e19ed87725f7bdd2ba96a0b20d07ff33df66/src/Context.php#L68
The code above is set when initializing the context, and it checks whether
FLAG_RENDER_DEBUG
is set in$flags
and if so assigns it to$context['flags']['debug']
.And then upon rendering, if lightncandy encounters an error, it checks wether
$context['flags']['debug']
is set toDEBUG_ERROR_LOG
orDEBUG_ERROR_EXCEPTION
, and if so it either logs or throws an exception (respectively):https://github.com/zordius/lightncandy/blob/f962e19ed87725f7bdd2ba96a0b20d07ff33df66/src/Runtime.php#L106-L115
Unless I'm missing something, these conditionals will never be true since
$context['flags']['debug']
is either set to0
orFLAG_RENDER_DEBUG
.