← Back to index
|
Original Bugzilla link
Bug 12646 – Catching Errors should imply nothrow
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-25T13:11:00Z
Last change time
2014-04-25T14:05:58Z
Keywords
pull, rejects-valid
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich
Comments
Comment #0
by andrej.mitrovich — 2014-04-25T13:11:42Z
----- void func() { } // ok void test1() nothrow { try { func(); } catch (Exception th) { } } // Error: function 'test.test2' is nothrow yet may throw void test2() nothrow { try { func(); } catch (Error th) { } } void main() { } -----
Comment #1
by andrej.mitrovich — 2014-04-25T13:21:07Z
https://github.com/D-Programming-Language/dmd/pull/3497
Comment #2
by andrej.mitrovich — 2014-04-25T13:40:19Z
Sorry, invalid. Exception is derived from Throwable, not Error. My mistake.