Branch: Tag:


2019-04-15 09:56:19 by Henrik Grubbström (Grubba) <>

Concurrent.Pomise: Improved diagnostics for broken promises.

The Promise has typically already been destructed when the backtrace
is described, so ensure that it at least is present in the message.

Fixes [PIKE-181].

1143:    {    // NB: Don't complain about dropping STATE_NO_FUTURE on the floor.    if (state == STATE_PENDING) -  try_failure(({ "Promise broken.\n", backtrace() })); +  try_failure(({ sprintf("%O: Promise broken.\n", this), backtrace() }));    if ((state == STATE_REJECTED) && global_on_failure)    call_callback(global_on_failure, result);    result = UNDEFINED;