[D-runtime] [D-Programming-Language/druntime] 1117e5: implemented proper exception chaining on Posix

Sean Kelly sean at invisibleduck.org
Tue Mar 29 07:21:10 PDT 2011


Thanks!  I'll make sure the Posix implementation passes the tests today, then submit a pull request to remove the version flag.

On Mar 28, 2011, at 5:18 PM, Don Clugston wrote:

> Excellent!
> The rule I used on Windows is that chaining goes in historical order
> (the first Error stays as the Master exception and subsequent Errors
> are chained to it). This rule applies in all cases except when an
> Error is thrown when an Exception is in flight; this is ONLY time when
> queue-jumping occurs.
> BTW the DMD test suite has some harsh tests for exception chaining,
> they are enabled only for Windows at the moment.
> set version  = TdplExceptionChaining in:
> test/runnable/eh.d
> See also
> test/runnable/test4.d
> 
> 
> On 29 March 2011 00:09, Sean Kelly <sean at invisibleduck.org> wrote:
>> These changes should bring Posix exception chaining in line with Windows.  The basic rule is that when a new (non-Error) Throwable T is thrown past an in-flight Throwable F it is replaced by F and appended to F's chain.  If T is an Error then F is appended to T's chain and T continues to meander up the stack.  I wasn't sure what to do if both T and F were of type Error, so I stuck to the aforementioned rule for now.  I've tested this for a few moderately complex cases, but haven't gotten really fancy with nested exception generation.  Hopefully the test suite will prove things out further.
>> _______________________________________________
>> D-runtime mailing list
>> D-runtime at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/d-runtime
>> 
> _______________________________________________
> D-runtime mailing list
> D-runtime at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/d-runtime



More information about the D-runtime mailing list