Skip to content

Bug: invalid for-loop bounds produce cryptic 'stoll' error #12

Description

@nholthaus

Problem

When a for loop receives a non-integer start or end value, the runtime currently surfaces a cryptic internal parsing message such as FATAL ERROR: 'for' stoll. This leaks an implementation detail instead of telling the script author what is wrong with the loop input.

Specification

Improve the user-facing error for invalid for loop bounds.

Acceptance criteria:

  • Non-integer start or end values for for fail with a clear, user-meaningful error message.
  • The error explains that the loop bounds must be valid integers.
  • The error still includes normal source location context.
  • Valid for loops keep their current behavior.

Motivation

This is a small correctness-and-polish bug that improves debuggability for script authors without changing the language surface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugeasy difficultySmall, well-scoped implementation effort

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions