cecco974 / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

Improve error message when attempting to use @fileOverview and @class together #195

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Apply fileOverview and class tags in the same comment box, e.g.

/**
 * @fileOverview Test
 * @class Test
 /
var Test = {}

Result:

>> WARNING: Trying to document js as a member of undocumented symbol
/home/user/Desktop/test.
>> WARNING: Sorry, that doesn't seem to be a valid template:
templates/jsdoc/publish.js : JavaException: java.io.FileNotFoundException:
/home/user/jsdoc-toolkit/app/../out/jsdoc/symbols/home/user/Desktop/test.js.html
(No such file or directory)
2 warnings.

I'm pretty sure this is a mis-use of the Class tag, but perhaps a more
informative error message could be displayed?

Settings:

jsdoc-toolkit 2.10, Ubuntu 8.10, java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6.1) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Server VM (build 1.6.0_0-b12, mixed mode)

Original issue reported on code.google.com by keith.hu...@gmail.com on 29 Jan 2009 at 6:56

GoogleCodeExporter commented 8 years ago
Yep, it's a misuse and will cause an error. That's because, for symbols of type 
"file," the @name is the name of 
the file, whereas for symbols of type "class" the @name is the name of the 
constructor function. A documented 
symbol can never have more than one name.

for correct usage see 
http://code.google.com/p/jsdoc-toolkit/wiki/TagFileOverview

I do agree that the error message could be clearer though.

Original comment by micmath on 29 Jan 2009 at 7:08