Skip to content

fix: add standardized exit codes on improper exit (issue #1221)#1651

Open
aniu26 wants to merge 1 commit intoNVIDIA:mainfrom
aniu26:fix-1221-exit-codes
Open

fix: add standardized exit codes on improper exit (issue #1221)#1651
aniu26 wants to merge 1 commit intoNVIDIA:mainfrom
aniu26:fix-1221-exit-codes

Conversation

@aniu26
Copy link
Copy Markdown

@aniu26 aniu26 commented Mar 26, 2026

  • Add GarakExitCodes IntEnum to exception.py with 11 exit codes: INTERRUPTED=-1, PROBE_EXCEPTION=-2, GENERATOR_EXCEPTION=-3, DETECTOR_EXCEPTION=-4, BUFF_EXCEPTION=-5, EVALUATOR_EXCEPTION=-6, HARNESS_EXCEPTION=-7, LANGPROVIDER_EXCEPTION=-8, REPORTING_EXCEPTION=-9, RESOURCE_EXHAUSTED=-10, UNSPECIFIED_EXCEPTION=-127
  • Fix KeyboardInterrupt handler: was exiting 0, now exits -1
  • Fix ValueError/GarakException handler: was exiting 0, now exits -127
  • Fix interactive mode handler: was exit(1), now uses GarakExitCodes

- Add GarakExitCodes IntEnum to exception.py with 11 exit codes:
  INTERRUPTED=-1, PROBE_EXCEPTION=-2, GENERATOR_EXCEPTION=-3,
  DETECTOR_EXCEPTION=-4, BUFF_EXCEPTION=-5, EVALUATOR_EXCEPTION=-6,
  HARNESS_EXCEPTION=-7, LANGPROVIDER_EXCEPTION=-8,
  REPORTING_EXCEPTION=-9, RESOURCE_EXHAUSTED=-10,
  UNSPECIFIED_EXCEPTION=-127
- Fix KeyboardInterrupt handler: was exiting 0, now exits -1
- Fix ValueError/GarakException handler: was exiting 0, now exits -127
- Fix interactive mode handler: was exit(1), now uses GarakExitCodes
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

DCO Assistant Lite bot All contributors have signed the DCO ✍️ ✅

@aniu26
Copy link
Copy Markdown
Author

aniu26 commented Mar 26, 2026

I have read the DCO Document and I hereby sign the DCO

@aniu26
Copy link
Copy Markdown
Author

aniu26 commented Mar 26, 2026

I have read the CLA Document and I hereby sign the CLA

@aniu26
Copy link
Copy Markdown
Author

aniu26 commented Mar 26, 2026

recheck

github-actions bot added a commit that referenced this pull request Mar 26, 2026
Copy link
Copy Markdown
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review test failures.

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.

arch: give exit codes on improper exit

2 participants