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

Support @throws tag #305

Merged
merged 4 commits into from
Jan 15, 2015
Merged

Support @throws tag #305

merged 4 commits into from
Jan 15, 2015

Conversation

okuryu
Copy link
Member

@okuryu okuryu commented Jan 1, 2015

It works similar with the @return tag. This means that a type is optional. An actual example is like the following. And, this resolves #135 finally.

/**
 * @method getName
 * @throws {Error} Throws an exception error.
 */
function getName() {
    // do something
}

This is a new feature, so I wish I could get any reviewers.

/cc @juandopazo @caridy

It works similar with the "@return" tag. This means that a type is optional.
An actual example is like the following. And, this resolves yui#135 finally.

/**
 * @method getName
 * @throws {Error} Throws an exception error.
 */
function getName() {
    // do something
}
@yahoocla
Copy link

yahoocla commented Jan 1, 2015

CLA is valid!

@@ -182,6 +182,7 @@ YUI.add('docparser', function (Y) {
'augments': 'uses', // YUI convention for prototype mixins
'depreciated': 'deprecated', // subtle difference
'desciption': 'description', // shouldn't need the @description tag at all
'exception': 'throws', // we may want standalone inner functions at some point
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment doesn't make any sense. Copy/paste issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I just fixed.

@okuryu okuryu mentioned this pull request Jan 2, 2015
@okuryu okuryu self-assigned this Jan 4, 2015
@okuryu
Copy link
Member Author

okuryu commented Jan 13, 2015

I'll merge this in the next week if I have no feedback this week. And I'm planning release the next version with this in the next week.

/cc @juandopazo @caridy

@@ -191,7 +192,8 @@ YUI.add('docparser', function (Y) {
'parma': 'param', // typo
'propery': 'property', // typo
'prop': 'property', // probably meant property
'returns': 'return' // need to standardize on one or the other
'returns': 'return', // need to standardize on one or the other
'throw': 'throws' // need to standardize on one or the other
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need throw or exception unless users tell us it's a common mistake.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, OK! Moved out.

@okuryu
Copy link
Member Author

okuryu commented Jan 14, 2015

Updated for review from @juandopazo.

@juandopazo
Copy link
Member

LGTM!

@okuryu
Copy link
Member Author

okuryu commented Jan 15, 2015

Thanks a lot.

@okuryu okuryu merged commit 919dea0 into yui:master Jan 15, 2015
@okuryu okuryu deleted the throws branch January 15, 2015 11:49
@okuryu okuryu added this to the v0.5.0 milestone Jan 15, 2015
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

Successfully merging this pull request may close these issues.

Supports @throws tag
4 participants