Git Product home page Git Product logo

forematter's Issues

undefined method `downcase' for nil:NilClass (NoMethodError)

when querying a particular element that does not exist

$ find content/ -type f -name '*.md' | xargs fore list tags                                                                                                              
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter/commands/list.rb:13:in `each': undefined method `downcase' for nil:NilClass (NoMethodError)
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter/commands/list.rb:13:in `sort_by'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter/commands/list.rb:13:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter/command_runner.rb:6:in `call'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command_dsl.rb:185:in `block in runner'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command.rb:298:in `call'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command.rb:298:in `run_this'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command.rb:251:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command.rb:264:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter.rb:36:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/bin/fore:10:in `<top (required)>'

don't crash with stack trace for recoverable errors

Case 1:
when processing a list of files, rescue from File Not Found RuntimeError, print the error to standard error, and continue with the rest of the files in the list. Exit with non-zero status to indicate not all files were processed as requested.

Case 2:
When attempting to perform an operation that doesn't make sense, i.e. adding to an element that is not a set, print an error message to standard error and exit with non-zero status, but don't print a stack trace.

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.