traces inside of a try block are not flagged as error, even if error was thrown #197
Closed
8 tasks done
Labels
enhancement
New feature or request
instrumentation
Related to how we instrument the code in `dbux-babel-plugin`
Problem
try
block does not get detected correctly.finally
block will be flagged aserror
trace (incorrectly).Examples
error4.js
: error trace flagged incorrectly - should betodos
(beforetodos.x
) but is on=
trace instead.error2.js
-previousTraceInContext
ofPopImmediate
does not work with try-catch casesSolution
We are currently only resolving errors from
PopImmediate
inDataProvider.resolveErrorTraces
. Currently, only traces that arePopImmediate
and also!isTraceFunctionExit
are error traces.TraceTypes
:TraceType.TryBlockExit
TraceType.Catch
TraceType.Finally
DataProvider.resolveErrorTraces
Trace.previousTrace
(it seems to be inaccurate?)previousTrace = getPreviousInContext()
instead?getReturnTraceOfRealContext
check (it's more complicated than that)previousTrace
if...:trace
isPop
and!isTraceReturn(previousTrace)
and!isTraceFunctionExit(previousTrace)
error-try-return-finally.js
anderror3.js
trace
isTraceType.Catch
trace
isTraceType.Finally
andpreviousTrace
is intry
block and notTraceType.TryExit
and!isTraceReturn(previousTrace)
and!isTraceFunctionExit(previousTrace)
The text was updated successfully, but these errors were encountered: