https://issues.dlang.org/show_bug.cgi?id=22191
Issue ID: 22191
Summary: -betterC: Overeager try/catch prohibition
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
```
void foo() nothrow {}
void main()
{
try { foo(); }
catch (Exception) {}
}
```
The frontend removes the try/catch from the AST at some point, so this should
compile with -betterC too but doesn't ('Error: Cannot use try-catch statements
with -betterC').
--