Giter Site home page Giter Site logo

querybooks's Issues

Please don‘t just throw the error, handle it.

My .bkconf.json here:

{
"booksdir":"~/Ebooks"
}

when I run bk -h I get the output:

bk -l
fs.js:143
throw err;
^

Error: ENOENT: no such file or directory, stat '~/Ebooks'
at Object.fs.statSync (fs.js:946:3)
at recdir (/usr/local/lib/node_modules/querybooks/recdir.js:5:20)
at createList (/usr/local/lib/node_modules/querybooks/app.js:74:3)
at Object.runApp [as run] (/usr/local/lib/node_modules/querybooks/app.js:28:20)
at Object. (/usr/local/lib/node_modules/querybooks/index.js:3:5)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)

I wonder it's may be much more better to handle it when the books directory is not exist rather than just throw an error ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.