V
V
Vsevolod Rodionov2013-12-13 12:30:21
JavaScript
Vsevolod Rodionov, 2013-12-13 12:30:21

Chrome error rethrow - now points to the location of the throw instead of the location of the original error. How to fix?

The library uses the following wrapper to execute custom code:

try {
    exec(callback)
} catch (e) {
    setTimeout(function(){throw e})
}

For a number of reasons, the code itself cannot be isolated in setTimeout (an explicit execution order is required). Error throw is also necessary for debugging custom code.
Previously, this method duplicated the original error and showed its place. Right now it points to setTimeout(function(){throw e}), which doesn't really help debugging. There are no traces, of course. Is it possible to somehow fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2013-12-13
@VitaliiDel

What is setTimeout for here?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question