pub(crate) fn i32_to_usize( value: i32, error_message: &'static str, ) -> Result<usize>
Return error on invalid range.