Skip to content

Commit fc46953

Browse files
Minor naming/comment changes.
1 parent 2503e50 commit fc46953

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/services/services.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2778,7 +2778,7 @@ module ts {
27782778
}
27792779

27802780
function getThrowOccurrences(throwStatement: ThrowStatement) {
2781-
var owner = getContextualThrowStatementOwner(throwStatement);
2781+
var owner = getThrowStatementOwner(throwStatement);
27822782

27832783
if (!owner) {
27842784
return undefined;
@@ -2817,12 +2817,12 @@ module ts {
28172817
else if (node.kind === SyntaxKind.TryStatement) {
28182818
var tryStatement = <TryStatement>node;
28192819

2820-
// If a try statement has a catch clause, then any thrown exceptions in the try block
2821-
// will be propagated to the next owner.
28222820
if (tryStatement.catchBlock) {
28232821
aggregate(tryStatement.catchBlock);
28242822
}
28252823
else {
2824+
// Exceptions thrown within a try block lacking a catch clause
2825+
// are "owned" in the current context.
28262826
aggregate(tryStatement.tryBlock);
28272827
}
28282828

@@ -2838,11 +2838,11 @@ module ts {
28382838
}
28392839

28402840
/**
2841-
* For lack of a better name, this function takes a throw statement and returns the first
2842-
* encountered ancestor that is a try-block (whose try statement has a catch clause),
2841+
* For lack of a better name, this function takes a throw statement and returns the
2842+
* nearest ancestor that is a try-block (whose try statement has a catch clause),
28432843
* function-block, or source file.
28442844
*/
2845-
function getContextualThrowStatementOwner(throwStatement: ThrowStatement): Node {
2845+
function getThrowStatementOwner(throwStatement: ThrowStatement): Node {
28462846
var child: Node = throwStatement;
28472847

28482848
while (child.parent) {

0 commit comments

Comments
 (0)