ClosedBit error docs

CB_ERR_SHIFT_RANGE

Shift count out of range. A bit shift used a count outside the valid 0..255 range.

Why it happens

A bit shift used a count outside the valid 0..255 range.

How to fix it

Clamp or validate the shift count before shifting.

Copy-paste fix pattern
library CB-Math

fn main() {
    u256 shift = CB-Math.clamp(requested_shift, 0, 255)
    save one << shift
}
Runtime and Studio now show this kind of page from the error dialog: plain message first, stable code second, original details third.