ClosedBit error docs

CB_ERR_STRING_INDEX

String index out of range. The program tried to read a character outside the string.

Why it happens

The program tried to read a character outside the string.

How to fix it

Check string length before indexing, or use substring with a validated start and count.

Copy-paste fix pattern
fn main() {
    string name = "ClosedBit"
    u256 at = 0
    if (at < len(name)) {
        println(name[at])
    }
}
Runtime and Studio now show this kind of page from the error dialog: plain message first, stable code second, original details third.