开发者

ReSharper search pattern: "Can not parse pattern"

开发者 https://www.devze.com 2023-01-17 09:25 出处:网络
R# 5.1.1751.8 When I perform a pattern search for... catch开发者_开发知识库 (Exception e) {} ...I\'m shown an error dialog which says \"Can not parse pattern\".

R# 5.1.1751.8

When I perform a pattern search for...

catch开发者_开发知识库 (Exception e) {}

...I'm shown an error dialog which says "Can not parse pattern".

What about that pattern cannot be parsed? What am I doing wrong?


I emailed JetBrains support and got the following response:

ReSharper cannot parse only part of a C# language construct. In this case, 'catch(Exception e){}' is part of a try/catch construct. The following will search for empty catch clauses:

try {
    $stmt$
}
catch(Exception e)
{
}

( where $stmt$ is "one or more statements" ).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号