ClosedBit error docs

CB_ERR_EMPTY_ARRAY

Array is empty. A function needed at least one item, but the array had none.

Why it happens

A function needed at least one item, but the array had none.

How to fix it

Check len(array) before pop, pick, min, max, or selection helpers.

Copy-paste fix pattern
fn main() {
    array queue = []
    if (len(queue) > 0) {
        println(array.pop(queue))
    } else {
        println("queue empty")
    }
}
Runtime and Studio now show this kind of page from the error dialog: plain message first, stable code second, original details third.