Show exception messages in build output when fork is installed #159
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.
This PR prevents exception messages from being swallowed by build tasks.
My SSG config is set to fail on errors:
I ran into a situation today where my build started failing and the the only console output I got was:
After digging in I found that any
GenerationFailedException
thrown inside a build task's closure is ignored and only the closure's return value is captured by the calling method.I updated the task closures so that they will now return an exception message instead of throwing, then the calling method (
createContentFiles
), will check for an exception message in the results and throw an exception from outside a task loop.With this change the build output will now appear like this: