Skip to content

Improve error messages for ctd and viva (and more). Refactor run result handling - #504

Merged
pehrsoderman merged 5 commits into
Kattis:masterfrom
gkreitz:119_improve_viva_error_message
Oct 14, 2026
Merged

pehrsoderman merged 5 commits into
Kattis:masterfrom
gkreitz:119_improve_viva_error_message

Conversation

@gkreitz

@gkreitz gkreitz commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

This PR improves several error messages. Most notable is that syntax errors in ctd and viva scripts are now reported. Several places where we reported a raw status int (i.e., what you get back from wait) or just said "crashed", we now print a readable string like "Exit 4" or "SIGSEGV".

This is done by refactoring Execute.run to return a RunResult containing the runtime + status, plus some properties to easily interpret and render the status (result.exitcode == 0 reads better than os.WIFEXITED(status) and WEXITSTATUS(status) == 0). There's also a companion method to run and capture stdout/stderr.

Fixes #119

@gkreitz
gkreitz force-pushed the 119_improve_viva_error_message branch from 4baa705 to db12487 Compare October 14, 2026 11:11
@pehrsoderman
pehrsoderman merged commit 4d79ecf into Kattis:master Oct 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Give a helpful error message when trying to run a viva script on a system without Java

2 participants