try/catch (in some cases) causes resolveCallIds to fail
See original GitHub issueReproduction
- run express#20 (“should throw when Content-Type is an array”)
- you see several errors coming from
RuntimeDataProvider.resolveCallIds
- NOTE: this tries to look up the
callId
(traceId) of anyCallExpression
that was recorded while running; based onstaticTrace
data
- NOTE: this tries to look up the
- the issue seems to come from the fact that an error is thrown inside the
try
block inlib\router\layer.js:95
- you see several errors coming from
- express#18 shows similar symptoms.
NOTE: For some reason samples/error1.js
does not suffer from that problem.
- -> Maybe it only happens from nested function calls inside the
try
block? Not sure…
Steps to take
- Talk to @MiccWan (he is already researching this problem)
- First, find out if the instrumentation data is complete: i.e. every call-related trace must have a
callId
and the call result trace must have aresultCallId
.- -> Maybe add a Verbose mode that monitors the call stack resolution algorithm (similar to how Verbose mode in
traceVisitors
monitors the AST exploration)
- -> Maybe add a Verbose mode that monitors the call stack resolution algorithm (similar to how Verbose mode in
- There seems to be a bug where
ThrowArgument
has two result traces (but only one BCE). This might or might not be related (but also needs fixing).- At least this is what happens in Express#8.
- Need to isolate and fix this in instrumentation.
- NOTE: Traced in #346
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
tryCatch in R execute in case of error - Stack Overflow
Is it possible to execute certain commands in case of error when using tryCatch in R ? I am using the code below...
Read more >Error handling, "try...catch" - The Modern JavaScript Tutorial
Usually, a script “dies” (immediately stops) in case of an error, ... So, try...catch can only handle errors that occur in valid code....
Read more >Error handling in R with tryCatchLog: Catching, logging, post ...
The main advantages of the tryCatchLog function over tryCatch are: Easy logging of errors, warnings and messages into a file or console ...
Read more >Exceptions and debugging - Advanced R. - Hadley Wickham
tryCatch () has one other argument: finally . It specifies a block of code (not a function) to run regardless of whether the...
Read more >try...catch - JavaScript - MDN Web Docs - Mozilla
The try...catch statement is comprised of a try block and either a catch ... of expected errors, and then re-throw the error in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
#346 mentioned that
ThrowArgument
is traced more than once.Express#20 has long been fixed, and, while still dirty,
resolveCallIds
has been revised and its internal error reporting largely improved several times since. Also, @MiccWan has done a great job, fixing up mentionedRDP
andPDP
issues.