Repository navigation
An uncaught exception makes the CLI exit with status 1 - #517
Merged
Merged
Conversation
IoState_runCLI looked for the exception on the current coroutine, but "CLI run" executes in its own try coroutine, so it never saw one and a failing script exited 0. IoState_on_doCString_withLabel_exception_ now returns the uncaught exception from the try coroutine, and runCLI exits 1 when there is one (System exit keeps its own status). make check now verifies both exit statuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011WETVfgtbJ5chDp7AeZUe9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A script or
-eexpression that ended with an uncaught exception exited 0, so shell scripts and CI couldn't tell it failed.Cause:
IoState_runCLIchecked the current coroutine for an exception, butCLI runexecutes in its own try coroutine, so the exception was never there. The intent (exit non-zero) dates from 2009.Fix: a new
IoState_on_doCString_withLabel_exception_returns the uncaught exception from the try coroutine.runCLIexits 1 when there is one, unlessSystem exitalready set a status.-eraising, syntax errorSystem exit(3)Tests:
make checknow checks both exit statuses; the check fails on master. Io suite on both builds, C suite and 30 Node tests pass. The benchmark scripts still exit 0, so the benchmark job is unaffected.🤖 Generated with Claude Code
https://claude.ai/code/session_011WETVfgtbJ5chDp7AeZUe9