Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Improve error reporting when config.json has syntax errors #47

Closed
adrinux opened this issue Dec 7, 2012 · 0 comments
Closed

Improve error reporting when config.json has syntax errors #47

adrinux opened this issue Dec 7, 2012 · 0 comments

Comments

@adrinux
Copy link

adrinux commented Dec 7, 2012

When starting the punch server with 'punch s', if there is a syntax error in config.json a warning is given and punch falls back on the default config:

Cannot read the custom config: Error: ENOENT, stat 'config'
Using the default config.

However if you introduce a syntax error to config.json whilst developing the site you may end up with a different error that obfuscates the real problem somewhat. For example a missing comma in a stylesheet bundle might give 'Error: Content for combined.css not found'.

I'm not sure which config punch then uses, does it continue to use the custom config, or immediately fall back on the default?

It might me better not to fall back on the default config at all, ever, since a single error in config.json could cause multiple customisations to stop working, not just the one with the syntax error, again somewhat masking the real issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants