Fix for multiple throws + IP support #413
Open
+56
−19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
So there was an issue where if multiple @throws are included in a @method block, only the last one is reflected in the generated docs. This is not a good system, because a method can certainly throw multiple different types of exceptions. This issue was both a parser and a template issue. In the parser, the throws digester just pointed to the return digester (which can only handle one instance). So, I made the throws an array rather than one value, and created a new digester for throws (based largely on the return one). In the templates, I simply made the throws a
with- for each @throws (like @param).
The second change is that you can create a server that is not simply localhost. You can specify yuidoc --server IP:PORT. This isn't required, though, and it retains the capability of the existing syntax (yuidoc --server PORT), in which case the IP defaults to localhost. So, this only adds a potentially useful capability while maintaining backwards compatibility.
Thanks!