You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
### Description of the Change
Relax the too restrictive begin expression for catch block for following reasons:
* The begin pattern is not suitable for dealing with multi-line pattern.
* any comments between `catch` and `(` would also break the highlighting.
Leave the catch keywork be would just be fine, since syntax highlighting should only be responsible for happy path.
### Alternate Designs
Any other design would introduce new complexity.
### Benefits
* Can correctly highlight when caught exceptions are split in multiple lines
* Can correctly highlight when '(' is placed in a new line after `catch`
* Can correctly highlight when there is comment between `catch` and '('
* Reduces the complexity
### Possible Drawbacks
More like a `right` hightlight for wrong syntax in code.
### Applicable Issues
Fix#205FIxmicrosoft/vscode-java-pack#259
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From @JoeyRxy microsoft/vscode#78445
Snippet. Notice that there is an newline in the catch clause between some exception types.
Only the last exception type on each line get the scope:
storage.type.java
meta.function-call.java
source.java
The other exception types get scope:
meta.function-call.java
source.java
The text was updated successfully, but these errors were encountered: