为什么JSDoc在处理有效文件时抛出TypeError

时间:2013-01-30 19:42:40

标签: javascript jsdoc

我有一个带有一些JSDoc标记的dojo类。 JavaScript运行正常,没有错误,所以它肯定是一个有效的文件。

课程在这里:http://jsfiddle.net/8JpCR/

当我尝试在其上运行JSDoc时,为了生成文档,我得到:

org.mozilla.javascript.EcmaError: TypeError: Cannot read property "length" from undefined
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3785)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3763)
    at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3791)
    at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3810)
    at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3823)
    at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1508)
    at org.mozilla.javascript.gen.file__projects_jsdoc_lib_jsdoc_path_js_30._c_anonymous_2(Unknown Source)
    at org.mozilla.javascript.gen.file__projects_jsdoc_lib_jsdoc_path_js_30.call(Unknown Source)
    at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
    at org.mozilla.javascript.gen.file__projects_jsdoc_templates_default_publish_js_43._c_anonymous_26(Unknown Source)
    at org.mozilla.javascript.gen.file__projects_jsdoc_templates_default_publish_js_43.call(Unknown Source)
    at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
    at org.mozilla.javascript.gen._projects_jsdoc_jsdoc_js_1._c_main_3(Unknown Source)
    at org.mozilla.javascript.gen._projects_jsdoc_jsdoc_js_1.call(Unknown Source)
    at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
    at org.mozilla.javascript.gen._projects_jsdoc_jsdoc_js_1._c_script_0(Unknown Source)
    at org.mozilla.javascript.gen._projects_jsdoc_jsdoc_js_1.call(Unknown Source)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
    at org.mozilla.javascript.gen._projects_jsdoc_jsdoc_js_1.call(Unknown Source)
    at org.mozilla.javascript.gen._projects_jsdoc_jsdoc_js_1.exec(Unknown Source)
    at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:654)
    at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:552)
    at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:507)
    at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:499)
    at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:215)
    at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:134)
    at org.mozilla.javascript.Context.call(Context.java:521)
    at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535)
    at org.mozilla.javascript.tools.shell.Main.exec(Main.java:198)
    at org.mozilla.javascript.tools.shell.Main.main(Main.java:174)

JSDocs文档(hereherehere)的激增并没有多大用处。

还有其他人看到此错误吗?你到底了吗?关于JSDoc最新且准确的资源的任何指针?

1 个答案:

答案 0 :(得分:1)

这已在JSDoc的主分支中修复