Skip to content

Better error message for 'catch' block missing 'try'. #216

@DanielRosenwasser

Description

@DanielRosenwasser

Consider the following source file:

catch (x) {
}

Currently the compiler reports these errors:

(1,2): Declaration or statement expected.
(1,12): ';' expected.                    

And if we merge 57d7cf5, the compiler will report

(1,1): Declaration or statement expected.
(1,11): '=>' expected.                   

We should give better errors for catch blocks missing try blocks.

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions