incrementScoped

inline fun <T> incrementScoped(block: () -> T): T

Increments the counter, executes block, and decrements the counter when block completes. If the counter exceeds maxDepth, onOverflow is invoked before executing block.