Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors now always throw and thus exit with non-zero exit code #348

Merged
merged 2 commits into from
Oct 24, 2017

Conversation

AliSoftware
Copy link
Collaborator

@AliSoftware AliSoftware commented Oct 24, 2017

Fixes the second part of #346 (\cc @NachoSoto)

Basically, I've removed all logMessage(.error, …) calls and replaced intermediate do { } catch { } blocks with ErrorPrettifier.execute { }, which rethrows the error (and let it bubble up all the way to Commander.main) — just prettifying non-SwifGen, generic NSCocoaErrors thrown in that closure before rethrowing them, so that "Permission denied" errors and such are not printed in an ugly message in stderr but are presented in a nicer way.

@djbe this PR is meant to be merged after #347 so I've made the request to merge into your fix/templateref-empty-path branch. We can either merge #347 first then this one next, or merge this one first into #347 then merge #347 to merge it all to master.

Olivier Halligon added 2 commits October 24, 2017 12:40
Note: NSCocoaErrors like "Permission denied" or "Directory not found"
and such are wrapped in a prettier format whenever possible.
@AliSoftware AliSoftware requested a review from djbe October 24, 2017 10:47
@djbe djbe merged commit 8e55021 into fix/templateref-empty-path Oct 24, 2017
@djbe djbe deleted the fix/exit-non-zero branch October 24, 2017 10:59
Copy link

@NachoSoto NachoSoto left a comment

Choose a reason for hiding this comment

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

🙏

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.

3 participants