How to list methods not wrapped in a certain statement? #5282
Answered
by
aeisenberg
markpahulje
asked this question in
Q&A
-
How would you list methods not in a try-catch clause?
How to list methods not wrapped in Using statement?
|
Beta Was this translation helpful? Give feedback.
Answered by
aeisenberg
Mar 1, 2021
Replies: 1 comment 3 replies
-
I'm assuming this is in C#. Something like this should work to find method calls not lexically contained by a try-catch.
Of course, this only finds method calls lexically enclosed. Are you looking for method calls that are part of a data flow that is not in a try-catch block? For that you will need to use data-flow analysis. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aeisenberg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm assuming this is in C#. Something like this should work to find method calls not lexically contained by a try-catch.
Of course, this only finds method calls lexically enclosed. Are you looking for method calls that are part of a data flow that is not in a try-catch block? For that you will need to use data-flow analysis.