Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
fixed a minor bug with exception chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
complexmath committed Mar 29, 2011
1 parent 1117e5f commit 2035648
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rt/deh2.d
Expand Up @@ -247,13 +247,14 @@ extern (C) void _d_throwc(Object *h)
}
debug printf("index = %d\n", index);

if (index > -1 && index < dim)
if (dim)
{
auto phi = &handler_table.handler_info[index+1];
debug printf("next finally_code %p\n", phi.finally_code);
if (__inflight && __inflight.addr == phi.finally_code)
{
if (auto e = cast(Error)(cast(Throwable) h))
auto e = cast(Error)(cast(Throwable) h);
if (e !is null && (cast(Error) __inflight.t) is null)
{
debug printf("chaining inflight %p to new error %p\n", __inflight.t, h);

Expand Down

0 comments on commit 2035648

Please sign in to comment.