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

Better Handle Errors Thrown When Looking for a Deleted/Missing Pattern #543

Closed
bmuenzenmeyer opened this issue Oct 26, 2016 · 1 comment
Closed

Comments

@bmuenzenmeyer
Copy link
Member

Pattern Lab is quite unforgiving when it fails to find a pattern that does not exist, usually throwing a cryptic error message.

We should better wrap and handle this scenario and tell users what pattern the engine is lookin for.

@NickToye
Copy link

A recent error I received.

{ SyntaxError: Unexpected 'u' at line 1 column 2 of the JSON5 data. Still to read: "undefined"
at error (/Users/nicktoye/Dev/edition-node-gulp/node_modules/json5/lib/json5.js:56:25)
at word (/Users/nicktoye/Dev/edition-node-gulp/node_modules/json5/lib/json5.js:393:13)
at value (/Users/nicktoye/Dev/edition-node-gulp/node_modules/json5/lib/json5.js:493:56)
at Object.parse (/Users/nicktoye/Dev/edition-node-gulp/node_modules/json5/lib/json5.js:508:18)
at expandPartials (/Users/nicktoye/Dev/edition-node-gulp/node_modules/patternlab-node/core/lib/pattern_assembler.js:431:39)
at decomposePattern (/Users/nicktoye/Dev/edition-node-gulp/node_modules/patternlab-node/core/lib/pattern_assembler.js:229:7)
at processPatternRecursive (/Users/nicktoye/Dev/edition-node-gulp/node_modules/patternlab-node/core/lib/pattern_assembler.js:395:5)
at Object.process_pattern_recursive (/Users/nicktoye/Dev/edition-node-gulp/node_modules/patternlab-node/core/lib/pattern_assembler.js:542:7)
at /Users/nicktoye/Dev/edition-node-gulp/node_modules/patternlab-node/core/lib/patternlab.js:59:25
at /Users/nicktoye/Dev/edition-node-gulp/node_modules/diveSync/diveSync.js:57:18
message: 'Unexpected 'u' at line 1 column 2 of the JSON5 data. Still to read: "undefined"',
at: 1,
lineNumber: 1,
columnNumber: 2 }

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

No branches or pull requests

2 participants