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

Opaque error message when json file is empty #17

Closed
jtrain opened this issue Jul 1, 2012 · 1 comment
Closed

Opaque error message when json file is empty #17

jtrain opened this issue Jul 1, 2012 · 1 comment

Comments

@jtrain
Copy link

jtrain commented Jul 1, 2012

To reproduce:

  • create a standard punch setup
    punch setup .
  • create an empty content file touch contents/index.json and a template curl t.co > templates/index.mustache
  • serve punch s

What I expect to happen:
An error message warning of the empty index.json file

What I get instead:

Server is running on localhost:9009
Generating the site...

undefined:0

^
SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /usr/local/lib/node_modules/punch/lib/generator.js:130:26
    at [object Object].<anonymous> (fs.js:123:5)
    at [object Object].emit (events.js:64:17)
    at Object.oncomplete (fs.js:1190:12)
@laktek
Copy link
Owner

laktek commented Aug 27, 2012

This issue is fixed in Punch 0.4.0 (which was released today). Please check again after upgrading to it.

@laktek laktek closed this as completed Sep 27, 2012
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