diff --git a/compiler/noirc_evaluator/src/errors.rs b/compiler/noirc_evaluator/src/errors.rs index 2b328898257..cc9ad9fafe3 100644 --- a/compiler/noirc_evaluator/src/errors.rs +++ b/compiler/noirc_evaluator/src/errors.rs @@ -196,6 +196,13 @@ impl RuntimeError { location.span, ) } + RuntimeError::IndexOutOfBounds { .. } => { + let message = self.to_string(); + let location = + self.call_stack().back().unwrap_or_else(|| panic!("Expected RuntimeError to have a location. Error message: {message}")); + + Diagnostic::simple_warning(message, String::new(), location.span) + } _ => { let message = self.to_string(); let location =