Skip to content

Comments

added prettier message for file not found error issue #855#856

Merged
czechboy0 merged 6 commits intoapple:mainfrom
vishakha1411:vishakha
Jan 12, 2026
Merged

added prettier message for file not found error issue #855#856
czechboy0 merged 6 commits intoapple:mainfrom
vishakha1411:vishakha

Conversation

@vishakha1411
Copy link
Contributor

Motivation

Issue #855

Modifications

  • Updated loadedConfig() in GenerateOptions.swift to detect file-not-found errors (NSPOSIXErrorDomain, code 2) and emit a clearer, human-readable error message: “Configuration file not found at path: {path}. Please ensure the file exists and the path is correct.”
  • Applied the same error handling logic in FilterCommand.swift for consistency.

The handling explicitly checks:

  • Error domain: NSPOSIXErrorDomain
  • Error code: 2 (ENOENT – No such file or directory)

For all other errors, the original error message is preserved and surfaced as before.

Copy link
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

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

Looks great, thank you @vishakha1411 🙏

@czechboy0 czechboy0 enabled auto-merge (squash) January 9, 2026 13:40
auto-merge was automatically disabled January 9, 2026 14:19

Head branch was pushed to by a user without write access

@vishakha1411
Copy link
Contributor Author

Fixed CI failures caused by ambiguous ValidationError references in unit tests by explicitly using ArgumentParser.ValidationError

@czechboy0 czechboy0 enabled auto-merge (squash) January 9, 2026 17:31
auto-merge was automatically disabled January 9, 2026 22:24

Head branch was pushed to by a user without write access

@vishakha1411
Copy link
Contributor Author

Addressed the earlier CI failures around error message handling, CI is now awaiting workflow approval. Thanks!

@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Jan 12, 2026
@czechboy0 czechboy0 enabled auto-merge (squash) January 12, 2026 14:21
@czechboy0 czechboy0 merged commit 1876092 into apple:main Jan 12, 2026
53 of 55 checks passed
@vishakha1411 vishakha1411 deleted the vishakha branch January 23, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants