moos / wordpos

Part-of-speech utilities for node.js based on the WordNet database.
478 stars 41 forks source link

added a line to escape when the file is empty (i think) #2

Closed Sigfried closed 10 years ago

Sigfried commented 11 years ago

Probably my fix is no good. When I run the tests, I get errors like: Error with fast index file /usr/local/lib/node_modules/WNdb/dict/fast-index.noun.json { [Error: ENOENT, no such file or directory '/usr/local/lib/node_modules/WNdb/dict/fast-index.noun.json'] errno: 34, code: 'ENOENT', path: '/usr/local/lib/node_modules/WNdb/dict/fast-index.noun.json', syscall: 'open' }

But at the end I get 0 failures.

moos commented 10 years ago

This is a case where it should fail loudly! As of v0.1.9, it will fail even louder by throwing an exception if anything is wrong with the fast index files.