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

Crash: undefined method `<<' for nil:NilClass #475

Closed
cybermerlin opened this issue Oct 18, 2013 · 8 comments
Closed

Crash: undefined method `<<' for nil:NilClass #475

cybermerlin opened this issue Oct 18, 2013 · 8 comments

Comments

@cybermerlin
Copy link

Error: Error while parsing D:/js/nene.js: undefined method `<<' for nil:NilClass

Here's a full backtrace:

C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/class_doc_expander.rb:62:in `block in expand_comment'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/class_doc_expander.rb:48:in `each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/class_doc_expander.rb:48:in `expand_comment'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/class_doc_expander.rb:20:in `expand'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/parser.rb:57:in`expand'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/parser.rb:31:in`block in parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/parser.rb:30:in`map'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/parser.rb:30:in`parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/batch_parser.rb:25:in `block in parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/util/parallel.rb:26:in `map'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/util/parallel.rb:26:in `map'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/batch_parser.rb:17:in `parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/app.rb:41:in `parse'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/lib/jsduck/app.rb:21:in `run'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jsduck-5.3.4/bin/jsduck:25:in `<top (required)>'
C:/Ruby200-x64/bin/jsduck:23:in `load'
C:/Ruby200-x64/bin/jsduck:23:in `<main>'
@nene
Copy link
Member

nene commented Oct 18, 2013

Please include the JavaScript source that's causing the crash.

@cybermerlin
Copy link
Author

mb i include some others?

@cybermerlin
Copy link
Author

n 2 problem

config.json
{
"--": "js",
"--title": "JavaScript FrameWorks",
"--output": "docs-js",
"--no-source": true,
"--exclude":"nene.js",
"--ignore-global":true,
"--warnings": [
"-nodoc",
"-link",
"-type_name",
"-html"
],
"--images": "docs-js/img",
"--builtin-classes": true,
"--seo": true
}
why nene.js was not excluded ?

@nene
Copy link
Member

nene commented Oct 18, 2013

I assume that you want to exclude nene.js from the js/ directory, but you have specified --exclude nene.js (from current dir) instead of --exclude js/nene.js.

@cybermerlin
Copy link
Author

/**
 * работа с сертификатами
 * криптографические функции
 * @class Crypt
 *
 * @uses ERROR
 * @uses Ext.cm.Crypt.Win
 *
 * @param {Object} [config] configuration
 *   @cfg {boolean} config.certified использовать сертифицированную версию плагина

Exception is occured at the last line

@cybermerlin
Copy link
Author

If i want more than one item to exclude? "--exclude": ["file1.js","file2.css"]

nene added a commit that referenced this issue Oct 18, 2013
Nothing really good to do in this situation, but at least avoid
crashing.

Refs #475
@nene
Copy link
Member

nene commented Oct 18, 2013

If you want to document constructor parameters inside class doc-comment you'll need to use @constructor tag. The recommended way, however, is to document constructor in a separate doc-comment.

@cfg doesn't work for documenting sub-properties of a @param. See @param docs. It shouldn't have caused a crash however - fixed now.

So what you should have written instead:

/**
 * @class Crypt
 * ...
 *
 * @constructor
 * @param {Object} [config] configuration
 * @param {boolean} config.certified использовать сертифицированную версию плагина
 */

@nene nene closed this as completed Oct 18, 2013
@cybermerlin
Copy link
Author

thanks

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

No branches or pull requests

2 participants