[Issue 11348] New: Introduce assumeWontThrow for use with nothrow functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 24 14:35:55 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11348
Summary: Introduce assumeWontThrow for use with nothrow
functions
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: pull
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-10-24 14:35:54 PDT ---
The assumeWontThrow function is useful in contexts where a nothrow function
might want to call some piece of code which is /not/ marked as nothrow even
though it doesn't necessarily throw.
If the called function does throw, assumeWontThrow will promote the exception
into an AssertError, which is an Error derivative and thus allows to be thrown
from nothrow functions.
https://github.com/D-Programming-Language/phobos/pull/1571
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list